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

// 계좌 점유 조회 관련 타입들
export enum AccountHolderAuthStatus {
  ALL = "",
  REQUEST = "REQUEST",
  SUCCESS = "SUCCESS",
  FAIL = "FAIL"
}

export enum AccountHolderAuthResult {
  MATCHED = "MATCHED",
  NOT_MATCHED = "NOT_MATCHED",
  FAILED = "FAILED"
}

export interface AccountHolderAuthListItem {
  tid?: string;
  accountName?: string;
  accountNo?: string;
  requestDate?: string;
  bankName?: string;
  authStatus?: AccountHolderAuthStatus;
}
export interface AccountHolderAuthListProps {
  additionalServiceCategory: AdditionalServiceCategory;
  listItems: Array<ExtensionAccountHolderAuthContentItem>;
  mid: string;
}
export interface AccountHolderAuthFilterProps extends FilterProps {
  mid: string;
  startDate: string;
  endDate: string;
  authStatus: AccountHolderAuthStatus;
  setMid: (mid: string) => void;
  setStartDate: (startDate: string) => void;
  setEndDate: (endDate: string) => void;
  setAuthStatus: (authStatus: AccountHolderAuthStatus) => void;
}

// 계좌 점유 인증 확장 서비스
// ========================================
export interface ExtensionAccountHolderAuthListParams {
  mid: string;
  fromDate: string;
  toDate: string;
  authStatus: string;
  page?: DefaultRequestPagination;
}

export interface ExtensionAccountHolderAuthListResponse extends DefaulResponsePagination {
  content: Array<ExtensionAccountHolderAuthContentItem>
}

export interface ExtensionAccountHolderAuthContentItem {
  tid?: string;
  accountName?: string;
  accountNo?: string;
  requestDate?: string;
  bankName?: string;
  authStatus?: AccountHolderAuthStatus;
}

export interface ExtensionAccountHolderAuthDownloadExcelParams extends ExtensionRequestParams {
  mid: string;
  email: string;
  fromDate: string;
  toDate: string;
  authStatus: AccountHolderAuthStatus;
}

export interface ExtensionAccountHolderAuthDownloadExcelResponse {
  status: boolean;
}

export interface ExtensionAccountHolderAuthDetailParams extends ExtensionRequestParams {
  tid: string;
}

export interface ExtensionAccountHolderAuthDetailResponse {
  tid: string;
  mid: string;
  accountName: string;
  accountNo: string;
  requestDate: string;
  companyName: string;
  bankName: string;
  authStatus: AccountHolderAuthStatus;
  failReason: string;
}