<script setup lang="ts">

import { onMounted } from 'vue'
import { useVueroContext } from '/@src/composables/vuero-context.ts'
import SideblockPageHeading from '/@src/components/layouts/sideblock/SideblockPageHeading.vue'

// 페이지 제목을 context에서 받아옴
const pageTitle = useVueroContext<string>('page-title')

// 사이드바 상태 제어
import { useSideblockLayoutContext } from '/@src/components/layouts/sideblock/sideblock.context'
const { isDesktopSideblockOpen } = useSideblockLayoutContext()

onMounted(() => {
  isDesktopSideblockOpen.value = true
})
</script>

<template>
  <SideblockPageHeading v-if="pageTitle">
    {{ pageTitle }}
    <template #toolbar>
      <button class="button is-primary">추가</button>
    </template>
  </SideblockPageHeading>
</template>
