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

export interface WorkflowDetailsListInterface {
    workflowDetailsList: WorkflowDetailsListDataTypeInterface[]
    workflowDetailsListCount: number
}

export interface WorkflowDetailsListDataTypeInterface
    extends WorkflowDetailsFormDataInterface {
    key: React.Key
}

export interface WorkflowDetailsFormDataInterface {
    alternativeBy: string
    alternativeName: string
    canSkip: number
    levelReference: string
    levelReferenceName: string
    levelType: string
    levelTypeName: string
    sequenceNo: string
    workflowLevel: string
    workflowLevelId: string
    clientCategoryName: string
    clientCategoryId: string
    departmentName: string
    departmentId: string
    activeStatus: string
    workflowName: string
    workflowId: string
}

export interface WorkflowDetailsPayloadInterface {
    data: WorkflowDetailsFormDataInterface[]
    noOfRecords: number
}

export interface WorkflowDetailsFormStateInterface {
    workflowDetail: WorkflowFormDataInterface
    workflowDetailsList: WorkflowFormDataInterface[]
    accessLevelList: ListFrontEndInterface[]
    categoryDropDownList: ListFrontEndInterface[]
    departmentDropDownList: ListFrontEndInterface[]
    approveByDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
}

export interface WorkflowDetailsFormInterface
    extends WorkflowDetailsFormStateInterface {
    onSave: (
        data: WorkflowDetailsFormDataInterface,
        callBack: CallableFunction
    ) => void
    editData: WorkflowDetailsFormDataInterface
}
