// ========================================
// 계좌성명 조회 관련 타입들
// ========================================

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

export enum AccountHolderResultStatus {
  ALL = "",
  SUCCESS = "SUCCESS",
  FAIL = "FAIL"
}

export interface AccountHolderSearchListItem {
  tid?: string;
  accountNo?: string;
  requestDate?: string;
  bankName?: string;
  resultStatus?: string;
}

export interface AccountHolderSearchListProps {
  listItems: Array<AccountHolderSearchListItem>;
  mid: string;
}

export interface AccountHolderSearchFilterProps extends FilterProps {
  mid: string;
  searchType: AccountHolderSearchCl;
  searchKeyword: string;
  startDate: string;
  endDate: string;
  bank: string;
  resultStatus: AccountHolderResultStatus;
  setMid: (mid: string) => void;
  setSearchType: (searchType: AccountHolderSearchCl) => void;
  setSearchKeyword: (searchKeyWorld: string) => void;
  setStartDate: (startDate: string) => void;
  setEndDate: (endDate: string) => void;
  setBank: (bank: string) => void;
  setResultStatus: (resultStatus: AccountHolderResultStatus) => void;
}

// 계좌 성명 조회 확장 서비스

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

// ========================================
export interface ExtensionAccountHolderSearchListParams extends ExtensionRequestParams { // Request
  searchCl: string;
  searchValue: string;
  fromDate: string;
  toDate: string;
  bankCode: string;
  resultStatus: string;
  page?: DefaultRequestPagination;
}
export interface ExtensionAccountHolderSearchListResponse extends DefaulResponsePagination { // Response
  content: Array<ListItemProps>
}

export interface ExtensionAccountHolderSearchDetailParams extends ExtensionRequestParams { // Request
  tid: string;
}

export interface ExtensionAccountHolderSearchDetailResponse {
  tid: string;
  accountNo: string;
  bankName: string;
  requestDate: string;
  accountName: string;
  resultStatus: string;
  failReason: string;
  requestWay: string;
}

export interface ExtensionAccountHolderSearchRequestParams extends ExtensionRequestParams {
  bankCode: string;
  accountNo: string;
}

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

export interface ExtensionAccountHolderSearchDownloadExcelParams extends ExtensionRequestParams { // Request
  email: string;
  searchCl: string;
  searchValue: string;
  fromDate?: string;
  toDate?: string;
  bankCode: string;
  resultStatus: string;
}

export interface ExtensionAccountHolderSearchDownloadExcelResponse {
  status: boolean;
}