import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'

export const useSiteManagementMenuStore = defineStore('siteManagementMenuStore', () => {  
  const menuContentList = ref<Record<string, any>[]>([])

  const deleteMenuList = ref<Record<string, any>[]>([])
  const menuControlId = ref<number>(0)

  const safeMenuItemData = reactive<Record<string, any>>({
    title: '',
    konumId: null,
    sira: null,
    slug: '',
    parentMenuId: null,
    pageId: null,
    isActive: true,
    targetKey: false
  })

  const menuItemData = reactive<Record<string, any>>({})

  return {
    deleteMenuList,
    menuContentList,
    menuControlId,
    menuItemData,
    safeMenuItemData
  }
})
