import { createEntityHook } from './useEntityBase'
import { ENDPOINTS } from '@/constants/endpoints'
import i18n from '@/lib/i18n'

export type SupplierDTO = {
  id: string
  supplier_no: string
  name_ar: string
  name_en?: string | null
  supplier_type: string
  status: string
  is_approved: boolean
  is_blocked: boolean
}

export const useSuppliers = createEntityHook<SupplierDTO, never, never>(
  i18n.t('hooks.useSuppliers.text_1'),
  ENDPOINTS.SUPPLIERS.LIST,
)
