<template>
  <AdminLayout>
    <Breadcrumb current-page-text="Yeni Sayfa" />
    <div class="form-part form-title">
      <div class="form-title-buttons">
        <button class="button-c button-save" @click="siteManagementPageService.SaveData">
          Kaydet
        </button>
        <router-link class="button-c button-cancel" to="/site-yonetimi/sayfa-listesi">
          Vazgeç
        </router-link>
      </div>
    </div>
    <div class="form-content">
      <div class="form-inner-content form-inner-content-left">
        <form-sayfa-bilgileri />
      </div>
      <div class="form-inner-content form-inner-content-right">
        <form-sayfa-ayar />
      </div>
    </div>
  </AdminLayout>
</template>
<script setup lang="ts">
  import { onBeforeMount } from 'vue'
  import AdminLayout from '@/layouts/AdminLayout.vue'
  import FormSayfaBilgileri from '../components/form/FormSayfaBilgileri.vue'
  import FormSayfaAyar from '../components/form/FormSayfaAyar.vue'

  import { useSiteManagementPageStore } from '../stores/siteManagementPageStore'
  const siteManagementPageStore = useSiteManagementPageStore()
  import { useSiteManagementPageService } from '../service/siteManagementPageService'
  const siteManagementPageService = useSiteManagementPageService()

  onBeforeMount(() => {
    siteManagementPageStore.isNew = true
  })
</script>
