import { type ListFrontEndInterface } from './CommonType'
import { type CorporateEntity } from './Invoice/Invoicing'

export interface ToDoViewAllListStateInterface {
    categoryDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
}

export interface GetServicesDetals {
    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 ThingstodoStateIntrface {
    thingsTodoList: GetServicesDetals[]
    thingsTodoListCount: number
}
export interface ThingstoDoAndFollowPaylod {
    data: GetServicesDetals[]
    noOfRecords: number
}
export interface ThingsTodoTableList extends GetServicesDetals {
    key: React.Key
}
export interface MyRequest {
    searchString: string
    pageNo: number
    pageSize: number
    flagId: number
    serviceId: number
    statusId: number
    clientCategoryId: number
    clientTypeId: number
    fromDate: string
    toDate: string
    nextStatmentFromDate: string
    nextStatmentToDate: string
    assignedBy: number
    assignedTo: number
    payeFrequency: number
}

export interface ToDoAdvanceSeach {
    targetDate: [string, string]
    nextStatmentToDate: [string, string]
    assignedbyId: number
    assignedToId: number
}
export interface ToDoViewAllListButtonProps extends ThingstodoStateIntrface {
    searchData: ToDoAdvanceSeach
    flagId: number
    clientCategoryId: number
    businessTypeId: number
    setServiceId: React.Dispatch<React.SetStateAction<number>>
    selectedIcon: number
    id: number
    statusId: number
    serviceid: number
}
export interface VatPageProps extends ThingstodoStateIntrface {
    setPagesize: React.Dispatch<React.SetStateAction<number>>
    setPageNumber: React.Dispatch<React.SetStateAction<number>>
    setDropdownId?: React.Dispatch<React.SetStateAction<number>>
    taskViewId: number
    serviceId: number
    id: number
    setSearchString: React.Dispatch<React.SetStateAction<string>>
    statusId: number
    updateRefetchData: () => void
}

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ServiceProcessActionStepHistory {}

export interface ProcessHistoryStatus {
    serviceActionGroupId: number
    serviceActionId: number
    serviceActionStepId: number
    serviceProcessId: number
    serviceProcessDetailId: number
    serviceProcessDetailStatusId: number
    title: string
    description: string
    assignDate: string
    dueDate: string | null
    completeDate: string
    status: string
    assignee: string
    workedUser: string
    assigneeRemarks: string
    userRemarks: string
    statusPropertyList: StatusProperty[]
}
export interface StatusProperty {
    serviceProcessDetailPropertyId: number
    serviceActionId: number
    serviceActionStepId: number
    serviceProcessId: number
    serviceProcessStatusId: number
    referenceId: number
    propertyValue: string
    propertyName: string
    propertyDataType: string
}

export interface ServiceProcessActionHistory {
    serviceProcessDetailId: number
    serviceActionId: number
    actionName: string
    sortingOrder: number
    statusId: number
    actionType: number
    status: string
    colorCode: string
    imgPath: string
    remarks: string
    completeStatusId: number
    completeStatus: string
    completeStatusColorCode: string
    activeStatusId: number
    emailTemplateId: number
    canSwitchUser: number
    canRevert: number
    serviceProcessActionStepHistoryList: ServiceProcessActionStepHistory[]
    processHistoryStatusList: ProcessHistoryStatus[]
}

export interface ServiceProcessActionGroup {
    serviceActionGroupId: number
    actionGroupName: string
    sortingOrder: number
    colorCode: string
    remarks: string
    completeStatusId: number
    completeStatus: string
    completeStatusColorCode: string
    serviceProcessActionHistoryList: ServiceProcessActionHistory[]
    activeStatusId: number
    canSwitchUser: number
}

export interface ServiceProcessCheckListHistory {
    serviceCheckListItemId: number
    serviceCheckListItemName: string
    serviceCheckListStatus: number
    remarks: string
}

export interface ServiceProcessCheckListResponse {
    serviceProcessCheckListHistory: ServiceProcessCheckListHistory
    serviceProcessActionGroupHistoryList: ServiceProcessActionGroup[]
}
export interface GetServiceProcessHistoryPayload {
    data: ServiceProcessCheckListResponse
}
export interface ServiceProcessHistoryState {
    serviceProcessHistoryList: ServiceProcessCheckListResponse
}
export interface ServiceProcessHistoryPageProp
    extends ServiceProcessHistoryState {
    serviceprocessId: number
}

export interface ToDoCommunicationHistoryTable
    extends ClientCommunicationHistory {
    key: React.Key
}
export interface TodotHistoryProps extends HistoryModelState {
    seletedButton: number | null
    serviceProcessId: number
    setButtonID: React.Dispatch<React.SetStateAction<number | null>>
}

export interface HistoryModelState {
    communicationHistoryList: ToDoCommunicationHistoryTable[]
    communicationHistoryListCount: number
}
export interface PhoneCallProps {
    serviceProcessId: number
    changePhoneCallModalStatus: () => void
    userList?: ListFrontEndInterface[]
    serviceActionId?: number
    businessTypeId: number
}
export interface ModelProps {
    serviceId?: number
    serviceProcessId: number
    changeModalStatus: () => void
    servicePrcessEmailTemplate?: ListFrontEndInterface[]
    userList?: ListFrontEndInterface[]
    paymentOptionList?: CorporateEntity[]
    businessType?: number
    referenceId?: number
    emailPageShow?: number
    updateRefetchData?: () => void
}

export interface ServiceProcessInviceProps {
    paymentOptionList: CorporateEntity[]
}
export interface StaffCommunicationProps {
    serviceProcessId: number
    userList: ListFrontEndInterface[]
}

export interface ServiceProcessIdData {
    initiateWithCheckList: number
    initiateWithCheckListFlag: number
    serviceName: string
    isEligibleToAccess: number
    eligibleRemarks: string
    processStatusId: number
    companyStatus: string
    serviceProcessId: number
    serviceId: number
    businessTypeId: number
    businessType: string
    companyName: string
    clientNumber: string
    referenceId: number
    year: number
    monthId: number
    periodStartDate: string
    periodEndDate: string
    displayStartDate: string
    displayEndDate: string
    dueDays: number
    assignee: string
    currentStatus: string
    currentStatusURL: string
    lastCommunicationStatus: string
    lastCommunicationStatusURL: string
    lastActionName: string
    additionalDataOne: string
    additionalDataTwo: string
    additionalDataThree: string
    additionalDataFour: string
    additionalDataFive: string
    isNewChatExist: number
}

export interface GetServiceProcessDataPayload {
    data: ServiceProcessIdData
}
export interface ServiceProcessPageProps {
    serviceProcessInduvidualData: ServiceProcessIdData
    serviceProcessDetailsList: ServiceActionGroup[]
    servicedataId: ServicedataIdInterface
}
interface ServicedataIdInterface {
    serviceProcesssId: number
    serviceId: number
}
export interface SwitchUserSaveData {
    serviceprocessid: number
    type: number
    referenceid: number
    workeduserid: number
    duedate: string
    assigneeremarks: string
    isapplycircle: number
}
export interface PinedMessage {
    msgReferenceId: number
    businessTypeId: number
    referenceId: number
    chatId: number
    serviceId: number
    description: string
}
export interface MailModelState {
    servicePrcessEmailTemplate: ListFrontEndInterface[]
}

export interface GetServiceProcessDetilsPayload {
    data: ServiceActionGroup[]
}

export interface ServiceProcessAction {
    serviceProcessDetailId: number
    serviceActionId: number
    actionName: string
    sortingOrder: number
    statusId: number
    actionType: number
    status: string
    colorCode: string
    imgPath: string
    remarks: string
    completeStatusId: number
    completeStatus: string
    completeStatusColorCode: string
    activeStatusId: number
    emailTemplateId: number
    canSwitchUser: number
    canRevert: number
    workingStaff: string
    serviceProcessActionStepList: serviceStepList[]
    assignedDate: string
    completeDate: string
    skippedRemarks: string
}
export interface serviceStepList {
    serviceActionStepId: number
    serviceProcessDetailId: number
    stepName: string
    sortingOrder: number
    statusId: number
    status: string
    colorCode: string
    remarks: string
    completeStatusId: number
    completeStatus: string
    completeStatusColorCode: string
    imgPath: string
    actionType: number
    activeStatusId: number
    canSwitchUser: number
    canRevert: number
}

export interface ServiceActionGroup {
    serviceActionGroupId: number
    actionGroupName: string
    sortingOrder: number
    colorCode: string
    remarks: string
    completeStatusId: number
    completeStatus: string
    completeStatusColorCode: string
    serviceProcessActionList: ServiceProcessAction[]
    activeStatusId: number
    canSwitchUser: number
}
export interface ServiceActionData {
    serviceActionGroupList: ServiceActionGroup[]
}
export interface changeProcessModelprops {
    serviceActionId: number
    serviceProcessId: number
    serviceProcessInduvidualData: ServiceProcessIdData
    changeModelState: () => void
    ServiceProcesName: string
}
export interface changeProcessModelProps {
    serviceProcessInduvidualData: ServiceProcessIdData
}

export interface changeProgressStatusSaveData {
    serviceProcessId: number
    type: number
    referenceId: number
    statusId: number
    remarks: string
    completeFlag: number
    emailTemplateId: number
    serviceProcessStatusProperty: statustPropety[]
}
export interface statustPropety {
    propertyType: number
    referenceId: number
    propertyDataType: string
    propertyValue: string
}
export interface ProcessCheckListItem {
    processCheckListItemId: number
    serviceCheckListItemId: number
    serviceProcessId: number
    serviceCheckListStatus: number
    itemType: number
    remarks: string
    itemName: string
    itemDescription: string
    processStatusId: number
}
export interface SaveSkipActionData {
    serviceProcessId: number
    serviceActionId: number
    skippedReason: string
}
export interface SaveProcessLavelSitchuser {
    switchUserType: number
    serviceProcessId: number
    existUserId: number
    newUserId: number
    existUserState: number
    serviceId: number
    newUserState: number
}

export interface ClientCommunicationHistory {
    communicationHistoryId: number
    communicationTypeId: number
    serviceProcessId: number
    description: string
    historyDate: string
    contactNumber: string
}

export interface InvoicePaymentStatusData {
    invoicePaymentStatusId: number
    serviceProcessId: number
    currentStatus: string
    paymentStatus: string
    paymentOptionId: number
    description: string
}
export interface PinnedMessageType {
    msgReferenceId: number
    businessTypeId: number
    referenceId: number
    chatId: number
    serviceId: number
    description: string
}

export interface ChangeDusDateSetData {
    serviceProcessId: number
    dueDate: string
    description: string
}

export interface SupplierInfoData {
    userName: string
    password: string
    consumerNo: string
    url: string
}

export interface VoidData {
    serviceProcessId: number
    comments: string
}
