
// ========================================
// 안면인증 관련 타입들
// ========================================

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

export enum FaceAuthTransType {
  ALL = "",
  REGISTER = "REGISTER",
  AUTH = "AUTH"
}

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

export interface FaceAuthListItem {
  companyName?: string;
  mid?: string;
  groupId?: string;
  requestDate?: string;
  requestTime?: string;
  cpid?: string;
  userMallId?: string;
  transType?: FaceAuthTransType;
  authResult?: string;
  failReason?: string;
}

export interface FaceAuthListProps {
  listItems: Record<string, Array<ListItemProps>>;
  mid: string;
}

export interface FaceAuthFilterProps extends FilterProps {
  mid: string;
  userMallId: string;
  fromDate: string;
  toDate: string;
  transType: FaceAuthTransType;
  authResult: FaceAuthResult;
  setMid: (mid: string) => void;
  setUserMallId: (userMallId: string) => void;
  setFromDate: (fromDate: string) => void;
  setToDate: (toDate: string) => void;
  setTransType: (transType: FaceAuthTransType) => void;
  setAuthResult: (authResult: FaceAuthResult) => void;
}

export interface ExtensionFaceAuthListParams extends ExtensionRequestParams {
  fromDate: string;
  toDate: string;
  userMallId: string;
  transType: FaceAuthTransType;
  authResult: string;
  page?: DefaultRequestPagination
}

export interface ExtensionFaceAuthListResponse extends DefaulResponsePagination {
  content: Array<FaceAuthListItem>
}

export interface ExtensionFaceAuthExcelDownlaodPrams {
  mid: string;
  email: string;
  fromDate: string;
  toDate: string;
}

export interface ExtensionFaceAuthExcelDownlaodResponse {
  status : boolean;
}

export interface ExtensionFaceAuthDetailParams {
  mid: string;
  cpid: string;
}

export interface ExtensionFaceAuthDetailResponse {
  companyName?: string;
  mid?: string;
  groupId?: string;
  requestDate?: string;
  requestTime?: string;
  cpid?: string;
  userMallId?: string;
  transType?: FaceAuthTransType;
  authResult?: string;
  failReason?: string;
}