import { DefaulResponsePagination, DefaultRequestPagination } from '@/entities/common/model/types';
import { ExtensionRequestParams, FilterProps, ListItemProps } from '../types';

export enum SmsType {
    ALL = "ALL",
    VACCOUNT_REQ = "VACCOUNT_REQ",
    VACCOUNT_REQ_DEPOSIT = "VACCOUNT_REQ_DEPOSIT"
}

export enum SmsPaymentSearchType {
    BUYER_NAME = "BUYER_NAME",
    RECEIVE_PHONE_NUMBER = "RECEIVE_PHONE_NUMBER"
}

export interface SmsPaymentListItem {
    mid?: string;
    tid?: string;
    paymentDate?: string;
    paymentStatus?: string;
    smsCl?: string;
}

export interface SmsPaymentListProps {
    listItems: Record<string, Array<ListItemProps>>;
    mid: string;
    onResendClick?: (mid: string, tid: string) => void;
}

export interface SmsPaymentFilterProps extends FilterProps {
    mid: string;
    searchCl: SmsPaymentSearchType;
    searchValue: string;
    fromDate: string;
    toDate: string;
    smsCl: SmsType;
    setMid: (mid: string) => void;
    setSearchCl: (searchCl: SmsPaymentSearchType) => void;
    setSearchValue: (searchValue: string) => void;
    setFromDate: (fromDate: string) => void;
    setToDate: (toDate: string) => void;
    setSmsCl: (smsCl: SmsType) => void;
}

export interface ExtensionSmsPaymentListParams extends ExtensionRequestParams {
    searchCl: SmsPaymentSearchType;
    searchValue: string;
    fromDate: string;
    toDate: string;
    smsCl: string;
    page?: DefaultRequestPagination;
}

export interface ExtensionSmsPaymentListResponse extends DefaulResponsePagination {
    content: Array<ListItemProps>
}

export interface ExtensionSmsDownloadExcelParams extends ExtensionRequestParams {
    searchCl?: SmsPaymentSearchType;
    searchValue: string;
    fromDate: string;
    toDate: string;
    smsCl?: string;
}

export interface ExtensionSmsDownloadExcelResponse {
    status: boolean;
}

export interface ExtensionSmsDetailParams extends ExtensionRequestParams {
    tid: string;
}

export interface ExtensionSmsDetailResponse {
    senderNumber: string;
    senderName: string;
    receiverNumber: string;
    receiverName: string;
    sendMessage: string;
}

export interface ExtensionSmsResendParams extends ExtensionRequestParams {
    tid: string;
}

export interface ExtensionSmsResendResponse {
    status: boolean;
}

export interface SmsPaymentDetailResendProps {
  bottomSmsPaymentDetailResendOn: boolean;
  setBottomSmsPaymentDetailResendOn: (bottomSmsPaymentDetailResendOn: boolean) => void;
  smsDetailData: ExtensionSmsDetailResponse | null;
  mid: string;
  tid: string;
}
