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

export enum FundAccountTabKeys {
  TransferList = 'TransferList',
  ResultList = 'ResultList'
};


export enum FundAccountSearchDateType {
  REQUEST_DATE = 'REQUEST_DATE',
  APPLICATION_DATE = 'APPLICATION_DATE'
};

export interface FundAccountTabProps {
  activeTab: FundAccountTabKeys;
};

export enum FundAccountReceiveAccountNameNo {
  ReceiveAccountNo = 'ReceiveAccountNo',
  ReceiveAccountName = 'ReceiveAccountName'
};

export interface ExtensionFundAccountTransferRegistParams {
  mid?: string;
  bankCode: string;
  accountNo: string;
  accountName: string;
  amount: number;
  moid: string;
  depositParameter?: string;
};

export interface ExtensionFundAccountTransferRegistResponse {
  status: boolean;
  data?: string;
  error?: {
    root?: string;
    errKey?: string;
    code?: string;
    message?: string;
    timestamp?: string;
    details?: {
      [key: string]: string;
    };
  };
};

export interface ExtensionFundAccountTransferRequestParams {
  seq: string;
}

export interface ExtensionFundAccountTransferRequestResponse {
  status: boolean;
  data?: string;
  error?: {
    root?: string;
    errKey?: string;
    code?: string;
    message?: string;
    timestamp?: string;
    details?: {
      [key: string]: string;
    };
  };
}

export enum FundAccountSearchCl {
  ACCOUNT_NAME = 'ACCOUNT_NAME',
  ACCOUNT_NO = 'ACCOUNT_NO'
}

export enum FundAccountStatus {
  ALL = '',
  REGIST_COMPLETE = 'REGIST_COMPLETE',
  TRANSFER_REQUEST = 'TRANSFER_REQUEST',
  REQUEST_SUCCESS = 'REQUEST_SUCCESS',
  REQUEST_FAIL = 'REQUEST_FAIL'
};

export enum FundAccountResultStatus {
  ALL = '',
  REQUEST = 'REQUEST',
  SUCCESS = 'SUCCESS',
  FAIL = 'FAIL'
}
export interface ExtensionFundAccountTransferListParams {
  mid: string;
  searchCl: string;
  searchValue: string;
  bankCode: string;
  fromDate: string;
  toDate: string;
  resultStatus: FundAccountStatus;
  page: DefaultRequestPagination;
}
export interface ExtensionFundAccountTransferListResponse {
  status: boolean;
  data: {
    content: Array<FundAccountTransferContentItem>;
    nextCursor: string;
    hasNext: boolean;
  };
}
export interface FundAccountTransferContent {
  pagination: string;
  items: Array<FundAccountTransferContentItem>;
};
export interface FundAccountTransferContentItem {
  tid?: string;
  registDate?: string;
  amount?: number;
  accountName?: string;
  accountNo?: string;
  resultMessage?: string;
  resultStatus?: string;
};
export interface ExtensionFundAccountTransferExcelParams {
  mid: string;
  email: string;
  fromDate: string;
  toDate: string;
};
export interface ExtensionFundAccountTransferExcelResponse {
  status: boolean;
};
export interface ExtensionFundAccountTransferDetailParams {
  seq: string;
};
export interface ExtensionFundAccountTransferDetailResponse {
  tid: string;
  mid: string;
  amount: number;
  accountName: string;
  accountNo: string;
  registDate: string;
  resultStatus: FundAccountStatus;
  requestDate: string;
  resultMessage: string;
  bankCode: string;
  moid: string;
};
export interface ExtensionFundAccountResultSummaryParams {
  mid: string;
}

export interface ExtensionFundAccountResultSummaryResponse {
  totalRequestCount: number;
  totalRequestAmount: number;
  totalSuccessCount: number;
  totalSuccessAmount: number;
  totalFailCount: number;
  totalFailAmount: number;
};
// 자금이체_결과조회 Request
export interface ExtensionFundAccountResultListParams {
  mid?: string;
  searchCl?: string;
  searchValue?: string;
  searchDateType?: FundAccountSearchDateType;
  fromDate?: string;
  toDate?: string;
  bankCode?: string;
  resultStatus?: FundAccountResultStatus;
  page?: DefaultRequestPagination;
};
export interface ExtensionFundAccountResultListResponse extends DefaulResponsePagination {
  content: Array<FundAccountResultContent>;
};
export interface FundAccountResultContent {
  pagination: string;
  items: Array<FundAccountResultContentItem>;
};
export interface FundAccountResultContentItem {
  tid?: string;
  mid?: string;
  requestDate?: string;
  applicationDate?: string;
  accountName?: string;
  accountNo?: string;
  amount?: number;
  resultStatus?: string;
  resultMessage?: string;
};
export interface ExtensionFundAccountResultExcelParams {
  mid: string;
  email: string;
  searchDateType: FundAccountSearchDateType
  fromDate: string;
  toDate: string;
};
export interface ExtensionFundAccountResultExcelResponse {
  status: boolean;
};
export interface ExtensionFundAccountResultDetailParams {
  mid: string;
  tid: string;
};
export interface ExtensionFundAccountResultDetailResponse {
  tid: string;
  mid: string;
  moid: string;
  amount: number;
  accountName: string;
  accountNo: string;
  applicationDate: string;
  requestDate: string;
  resultMessage: string;
  failReason: string;
  bankName: string;
};
export interface ExtensionFundAccountBalanceParams {
  mid: string;
};
export interface ExtensionFundAccountBalanceResponse {
  balance: number;
};

// 입금확인증 다운로드
export interface ExtensionFundAccountDownloadReceiptParams {
  mid: string;
  tid: string;
  email: string;
};
export interface ExtensionFundAccountDownloadReceiptResponse {
  status: boolean;
};