import { DefaulResponsePagination, DefaultRequestPagination } from '@/entities/common/model/types';


export enum VatReturnTabKeys {
  List = 'List',
  VatReference = 'VatReference',
};
export interface VatReturnTabProps {
  activeTab: VatReturnTabKeys;
};
export enum VatReturnReceiptType {
  ALL = 'ALL',
  RECEIPT = 'RECEIPT',
  BILL = 'BILL '
};
export enum VatReturnPayTax {
  TAX = 'TAXABLE',
  NOTAX = 'TAX_EXEMPT'
};
export enum VatReturnTargetType {
  ALL = 'ALL',
  GENERAL = 'GENERAL',
  DIFFERENCE_COLLECTION = 'DIFFERENCE_COLLECTION',
  REFUND_SETTLEMENT = 'REFUND_SETTLEMENT',
};

export interface VatReturnListParams {
  mid: string;
  startMonth?: string;
  endMonth?: string;
  receiptType?: VatReturnReceiptType;
  targetType?: VatReturnTargetType;
  page?: DefaultRequestPagination;
};
export interface VatReturnBreakdownParams {
  taxInvoiceNumber: string;
};
export interface VatReturnBreakdownResponse {
  breakdown: Array<Breakdown>;
};
export interface Breakdown {
  transactionDate: string;
  totalAmount: number;
  supplyAmount: number;
  vatAmount: number;
  transactionAmount: number;
};

export interface VatReturnListResponse extends DefaulResponsePagination {
  content: Array<VatReturnListContent>;
};

export interface VatReturnListContent {
  id?: number
  companyName?: string;
  mid?: string;
  issueDate?: string;
  paymentMethod?: string;
  amount?: number;
};

export interface ListDateGroupProps {
  date?: string;
  items?: Array<VatReturnListContent>
}
export interface ListItemProps {
  id?: number;
  companyName?: string;
  mid?: string;
  issueDate?: string;
  paymentMethod?: string;
  amount?: number;
}
export interface VatReturnDetailParams {
  taxInvoiceNumber?: string;
};

export interface VatReturnDetailResponse {
  id?: number;
  transactionAmount?: number;
  totalAmount?: number;
  supplyAmount?: number;
  vatAmount?: number;
  mid?: string;
  targetBusinessStartDate?: string;
  targetBusinessEndDate?: string;
  issueDate?: string;
  subject?: string;
  targetType?: VatReturnTargetType;
  receiptType?: VatReturnReceiptType;
  email?: string;
  receiverBusinessRegistrationNumber?: string;
  receiverCompanyName?:  string;
  receiverCeoName?: string;
  supplierBusinessRegistrationNumber?: string;
  supplierCompanyName?: string;
  supplierCeoName?: string;
};
export enum TaxType {
  
};
export interface VatReturnReferenceRequestParams {
  mid: string;
  startDate: string;
  endDate: string;
  taxType: string,
  email: string;
};
export interface VatReturnReferenceRequestResponse {
  requestId: number;
  mid: string;
  requestPeriod: string;
  taxTypeDescription: string;
  requestDateTime: string;
  requestStatus: string;
  requestorName: string;
  contactNumber: string;
  email: string;
};

export interface VatReturnTaxInvoiceParams {
  taxInvoiceNumber: string;
}
export interface VatReturnTaxInvoiceResponse {
  supplierInfo?: SupplierInfo;
  recipientInfo?: RecipientInfo;
  issueDate?: string;
  supplyAmount?: number;
  taxAmount?: number;
  totalAmount?: number;
  transactionDetails?: TransactionDetails;
};

export interface SupplierInfo {
  businessRegistrationNumber: string;
  companyName: string;
  ceoName: string;
  address: string;
  businessType: string;
  businessItem: string;
};
export interface RecipientInfo {
  businessRegistrationNumber: string;
  companyName: string;
  ceoName: string;
  address: string;
  businessType: string;
  businessItem: string;
  email: string;
};
export interface TransactionDetails {
  transactionPeriod: string;
  itemName: string;
  specification: string;
  quantity: number;
  unitPrice: number;
  supplyAmount: number;
  taxAmount: number;
  remarks: string;
};