import { IGoodResponse } from '@/domains/pos/models/good.io';
import { UnitType } from '@/utils';
import { TPosOrderGoodPayload } from './payload';

export interface IPosOrderItem<T = TPosOrderGoodPayload> {
  unit_price: number;
  quantity: number;
  total_amount: number;
  discount_amount: number;
  unit_type: UnitType;
  good_id?: string;
  service_id?: string;
  notes?: string;
  image_url?: string;
  payload: T;

  base_total_amount: number;
  discount: number;
  tax_amount: number;
}

export interface IPosInOrderGood extends Omit<IPosOrderItem, 'good_id' | 'service_id' | 'notes'> {
  id: string;
  good: IGoodResponse;
}
