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

export type RedemptionUpdateDTO = Partial<Omit<DeliveryOrderDTO, 'id' | 'order_number' | 'created_at' | 'updated_at'>>;

export const useRedemptions = createEntityHook<DeliveryOrderDTO, never, RedemptionUpdateDTO>(
  i18n.t('hooks.useRedemptions.text_1'),
  ENDPOINTS.REDEMPTIONS.LIST,
);