import { createEntityHook } from './useEntityBase';
import type { BranchDTO } from '@/types';
import { ENDPOINTS } from '@/constants/endpoints';
import i18n from "@/lib/i18n";

export type BranchCreateDTO = Omit<BranchDTO, 'id' | 'created_at' | 'updated_at'>;
export type BranchUpdateDTO = Partial<Omit<BranchDTO, 'id'>>;

export const useBranches = createEntityHook<BranchDTO, BranchCreateDTO, BranchUpdateDTO>(
  i18n.t('hooks.useBranches.text_1'),
  ENDPOINTS.BRANCHES.LIST,
);
