
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 { useGetServices} from '../../api/Services'
import { QueryStatusEnum } from '../../config/QueryStatus'
import EditServicesModal from './EditServicesModal'
import AddServicesModal from './AddServicesModal'

function ServicesPage() {

    const column   =useTableColumns()
    const {data  ,status } = useGetServices()

    console.log(data);
    
  return (
    // Pass Status to Layout 
    <DashBody status={status as QueryStatusEnum} >
      <DashHeader title={'Services'}></DashHeader>
      
      <LyTable
        data={data}
        isLoading={false}
        columns={column}
      />
      
      <EditServicesModal />
      <AddServicesModal />
      
    </DashBody>
  )
}

export default ServicesPage

