import { type ListFrontEndInterface } from '../CommonType'

export interface ClientDashBoardState {
    serviceDropDownList: ListFrontEndInterface[]
    CDashboradServiceProcessList?: CleitDashboardServiceProcess[]
    CDashboradServiceProcessListCount?: number
}

export interface ClientDashBordData {
    businessTypeId: number
    referenceId: number
    clientName: string
    clientNumber: string
    contactName: string
    contactNumber: string
    emailAddress: string
    altEmailAddress: string
    missedInfo: string
    serviceList: string
    vatSlot: number
    aaNextStatementDate: string
    aaDuebyDate: string
    additionalDataOne: string
    additionalDataTwo: string
    additionalDataThree: string
    companyStatus: string
}
export interface ClientDashBordPayloadInterface {
    data: ClientDashBordData | null
}

export interface ClientOverviewDashBordStateInterface {
    clientDashbordList: ClientDashBordData
}

export interface CleitDashboardServiceProcess {
    serviceProcessId: number
    serviceId: number
    serviceName: string
    businessTypeId: number
    referenceId: number
    year: number
    periodStartDate: string
    periodEndDate: string
    currentStatus: string
    dueDays: number
    assignBy: string
    assignTo: string
    assignDate: string
    dueDate: string
    completeDate: string
    businessType: string
    clientName: string
    clientNumber: string
    serviceProgressStatus: number
    actionName: string
    additionalDataOne: string
    additionalDataTwo: string
    additionalDataThree: string
    additionalDataFour: string
    additionalDataFive: string
    lastCommunicationStatus: string
    processDueDate: string
    assignDueDays: number
    dueDateDescription: string
    dueDateProgressStatus: number
    isNewChatExist: number
    signableUrl: string
    companyStatus: string
}

export interface ClientDashboardPayloadIntrface {
    data: CleitDashboardServiceProcess[]
    noOfRecords: number
}

export interface ClientDashboardStateIntrface {
    CDashboradServiceProcessList: CleitDashboardServiceProcess[]
    CDashboradServiceProcessListCount: number
}

export interface ClientServiceProcessTableIntrafce
    extends CleitDashboardServiceProcess {
    key: React.Key
}
export interface serviceProcessPageProps extends ClientDashBoardState {
    businessTypeId: number
    referenceId: number
}

export interface Invoice {
    no: number
    invoiceId: number
    invoiceNo: string
    invoiceDate: string
    netTotal: number
    businessType: string
    clientName: string
    clientNumber: string
    isSent: number
    sentDate: string
    serviceProcessId: number
    isPaid: number
    paidDate: string
    paidRemarks: string
    lastCommunicationStatus: string
    lastCommunicationStatusURL: string
    currentStatus: string
    isStripePaid: number
}

export interface InvoiceTableIntrface extends Invoice {
    key: React.Key
}

export interface ClientDashboardInvoicePayloadIntrface {
    data: Invoice[]
    noOfRecords: number
}

export interface ClientDashboardInvoiceStateIntrface {
    CDInvoiceList: Invoice[]
    CDInvoiceListCount: number
}

export interface CDClinetInvoiceProps
    extends ClientDashboardInvoiceStateIntrface {
    businessTypeId: number
    referenceId: number
}

export interface TaskData {
    taskId: number
    taskNo: number
    taskName: string
    priorityName: string
    priorityColourCode: string
    taskTypeName: string
    sortOrder: number
    businessTypeName: string
    clientName: string
    serviceName: string
    description: string
    assignedByName: string
    assignedToName: string
    fromDate: string
    toDate: string
    daysCount: number
    daysColourCode: string
    status: string
    statusColourCode: string
    notifyToStatusChange: number
    subTaskViews: any[]
    taskFollowerViews: any[]
    subTaskStatus: number
    isNewChatExist: number
}
export interface TaskTableIntrface extends TaskData {
    key: React.Key
}

export interface ClientDashboardTaskPayloadIntrface {
    data: TaskData[]
    noOfRecords: number
}

export interface ClientDashboardTaskStateIntrface {
    CDTaskList: TaskData[]
    CDTaskListCount: number
}

export interface CDClinetTaskDragTableProps {
    setPageSize: React.Dispatch<React.SetStateAction<number>>
    setPageNo: React.Dispatch<React.SetStateAction<number>>
    CDTaskList: TaskData[]
    CDTaskListCount: number
}

export interface ClientTaskPageProps extends ClientDashboardTaskStateIntrface {
    businessTypeId: number
    referenceId: number
}
export interface CDClientTaskProps {
    businessTypeId: number
    referenceId: number
}

export interface ClientCommunicationData {
    medium: number
    communicationFor: string
    clientEmailId: number
    clientEmailTypeId: number
    serviceProcessId: number
    actionName: string
    from: string
    fromAddress: string
    toAddress: string
    ccAddress: string
    bccAddress: string
    subject: string
    description: string
    sentBy: string
    sentByUrl: string
    sentDate: string
    sentDateSort: string
    emailStatus: string
    emailAttachmentExist: number
    smsContent: string
    contactNumber: string
    smsStatus: string
}

export interface ClientCommLogTableIntrface extends ClientCommunicationData {
    key: React.Key
}

export interface ClientDashboardClientComLogPayloadIntrface {
    data: ClientCommunicationData[]
    noOfRecords: number
}

export interface ClientDashboardClientCommLogStateIntrface {
    CDClientCommLogList: ClientCommunicationData[]
    CDClientCommLogListCount: number
}

export interface CDClientCommLogProps
    extends ClientDashboardClientCommLogStateIntrface {
    businessTypeId: number
    referenceId: number
}

export interface ChatMessage {
    msgType: number
    msgReferenceId: number
    chatDescription: string
    chatBy: string
    chatDate: string
    chatMessage: string
    imageURL: string
}

export interface ClientDashboardStaffComLogPayloadIntrface {
    data: ChatMessage[]
}

export interface ClientDashboardStaffCommLogStateIntrface {
    CDStaffCommLogList: ChatMessage[]
}

export interface CDStaffCommLogProps
    extends ClientDashboardStaffCommLogStateIntrface {
    businessTypeId: number
    referenceId: number
}

export interface StaffChatData {
    chatId: number
    businessTypeId: number
    referenceId: number
    isClientCommunication: number
    description: string
    userIds: number[]
}

export interface StaffCommunicationSet extends CDClientTaskProps {
    userList: Array<{ label: string }>
    closeModal: () => void
}

export interface CommunicationEmailAttachment {
    clientAttachmentId: number
    uniqueCode: string
    attachmentPath: string
}

export interface CommunicationEmailAttachmentList {
    communicationEmailAttachmentList: CommunicationEmailAttachment[]
    description: string
}

export interface CommunicationModelProps extends CDClientTaskProps {
    changeModalStatus: () => void
}

export interface ContactInfo {
    title: string
    firstName: string
    middleName: string
    surName: string
    mobileNumber: string
    homeNumber?: string
    workNumber?: string
    emailAddress: string
    alternativeEmailAddress?: string
}
