
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 { useGetTeamMember} from '../../api/teamMember'
import { QueryStatusEnum } from '../../config/QueryStatus'
import EditTeamMemberModal from './EditTeamMemberModal'
import AddTeamMemberModal from './AddTeamMemberModal'

function TeamMemberPage() {

    const column   =useTableColumns()
    const {data  ,status } = useGetTeamMember(
      {
        pagination:true
      }
    )
    
  return (
    // Pass Status to Layout 
    <DashBody status={status as QueryStatusEnum} >
      <DashHeader title={'TeamMember'}></DashHeader>
      
      <LyTable
        data={data?.data}
        isLoading={false}
        columns={column}  
        is_pagination
        total={data?.meta?.total}
      />
      
      
      <EditTeamMemberModal />
      <AddTeamMemberModal />
      
    </DashBody>
  )
}

export default TeamMemberPage

