<script setup lang="ts">
import PageMasterDetailAMaintenance from '@/components/pages/PageMasterDetailAMaintenance.vue'
import { useMasterDetailAMaintenancePage } from '@/composables/page-drivers/useMasterDetailAMaintenancePage'

const page = useMasterDetailAMaintenancePage()
</script>

<template>
  <PageMasterDetailAMaintenance
    v-model:search="page.search.value"
    v-model:search-panel-open="page.searchPanelOpen.value"
    v-bind="page.masterDetailProps.value"
    :current-page="page.currentPage.value"
    :grade-label="page.formState.gradeLabel"
    :headers="page.tableHeaders.value"
    :items="page.students.value"
    :items-per-page="page.itemsPerPage"
    :page="page.pageModel.value"
    :page-count="page.pageCount.value"
    :page-summary="page.pageSummary.value"
    :row-props="page.formState.rowProps"
    :status-color="page.formState.statusColor"
    @create="page.openAddDialog"
    @edit="page.openEditDialog"
    @reset-search="page.resetSearch"
    @update:current-page="page.currentPage.value = $event"
    @view="page.openViewDialog"
    v-on="page.masterDetailEvents"
  />

  <v-snackbar v-model="page.snackbarVisible.value" color="success" location="bottom right" :timeout="2200">
    儲存成功
  </v-snackbar>
</template>
