
import React from 'react'
import DashBody from '../../Layout/Dashboard/DashBody'
import DashHeader from '../../Layout/Dashboard/DashHeader'
import LyTable from '../../Layout/Dashboard/LyTable'
import useTableColumns from './useTableColumns'
import { useGetCertificate} from '../../api/certificate'
import { QueryStatusEnum } from '../../config/QueryStatus'
import EditCertificateModal from './EditCertificateModal'
import AddCertificateModal from './AddCertificateModal'
import LyTableCustom from '../../Layout/Dashboard/LyTableCustom'

function CertificatePage() {

    const column   =useTableColumns()
    const {data  ,status } = useGetCertificate(
      {
        pagination:true
      }
    )
    
  return (
    // Pass Status to Layout 
    <DashBody status={status as QueryStatusEnum} >
      <DashHeader title={'Certificate'}></DashHeader>
      
      <LyTableCustom
        data={data?.data}
        isLoading={false}
        columns={column}  
        is_pagination
        total={data?.meta?.total}
      />
      
      
      <EditCertificateModal />
      <AddCertificateModal />
      
    </DashBody>
  )
}

export default CertificatePage

