import { type ListFrontEndInterface } from './CommonType'

export interface ProjectManagmentListInterface {
    ProjectManagmentList: ProjectManagmentListDataTypeInterface[]
    ProjectManagmentListCount: number
}
export interface AttachmentDropDownListInterface {
    AttachmentDropDownList: AttachmentProjectManagmentListDataTypeInterface[]
    AttachmentDropDownListCount: number
}
export interface ProjectTierListInterface {
    TierList: TierListDataTypeInterface[]
    TierListCount: number
}
export interface TierListDataTypeInterface extends TierFormDataInterface {
    key: React.Key
}

export interface TierFormDataInterface {
    projectId: string
    projectPrefix: string
    projectName: string
    departmentId: number
    projectDescription: string
    projectStartDate: string
    projectEndDate: string
    clientCategoryId: number
    assignToUserId: number
    projectLeadUserId: number
}
export interface TierPayloadInterface {
    data: TierFormDataInterface[]
    noOfRecords: number
}
export interface AttachmentProjectManagmentListDataTypeInterface
    extends AttachmentProjectManagmentFormDataInterface {
    key: React.Key
}
export interface ProjectManagmentListDataTypeInterface
    extends ProjectManagmentFormDataInterface {
    key: React.Key
}

export interface AttachmentProjectManagmentFormDataInterface {
    projectAttachmentId: number
    projectId: string
    attachmentFile: string
    description: string
    canAccessByTaskLevel: number
    canAccessBySubTaskLevel: number
}

export interface ProjectManagmentFormDataInterface {
    projectId: string
    projectName: string
    departmentId: number | null
    department: string
    projectDescription: string
    projectStartDate: string | Date
    projectEndDate: string | Date
    completedTaskCount: number
    completedHoursCount: number
    pendingTaskCount: number
    assignedTaskCount: number
    inProgressTaskCount: number
    clientCategoryName: string
    clientCategoryId: number | null

    projectLeadId: number | null
    projectLeadName: string
    assignUserId: number | null
    assignUserName: string
    projectPrefix: string
}
export interface ProjectManagmentPayloadInterface {
    data: ProjectManagmentFormDataInterface[]
    noOfRecords: number
}
export interface AttachmentProjectProjectManagmentPayloadInterface {
    data: AttachmentProjectManagmentFormDataInterface[]
    noOfRecords: number
}
export interface ProjectManagmentStateInterface {
    categoryDropDownList: ListFrontEndInterface[]
    departmentDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
}
export interface ProjectManagmentFormInterface
    extends ProjectManagmentStateInterface {
    onSave: (callBack: CallableFunction) => void
    editData: ProjectManagmentFormDataInterface
}
export interface ProjectManagmentExpandViewInterface {
    ProjectData: ProjectManagmentListDataTypeInterface
}
export interface ProjectManagmentExpandViewStateInterface {
    ProjectManagmentList: ProjectManagmentListDataTypeInterface[]
    ProjectManagmentListCount: number
}
export interface FirstPageProps extends ProjectsManagmentStateInterface {
    editData: ProjectManagmentFormDataInterface
    onSave: (
        data: ProjectManagmentFormDataInterface,
        callBack: CallableFunction
    ) => void
}
export interface ProjectManagmentStausListInterface {
    ProjectManagmentStausList: ProjectManagmentStausListDataTypeInterface[]
    ProjectManagmentStausListCount: number
}
export interface ProjectManagmentTierListInterface {
    ProjectManagmentTierList: ProjectManagmentTierListDataTypeInterface[]
    ProjectManagmentTierListCount: number
}
export interface ProjectManagmentTierListDataTypeInterface
    extends ProjectManagmentTierFormDataInterface {
    key: React.Key
}
export interface ProjectManagmentTierFormDataInterface {
    projectTierId: string
    projectId: number
    projectName: string
    projectTierName: string
    parentProjectTierId: number
    parentProjectTierName: string
    children: ProjectManagmentTierFormDataInterface[]
}
export // Define the data type for a Project Tier
interface ProjectTier {
    projectTierId: string // Unique identifier for the project tier
    projectId: string // Identifier linking the tier to a specific project
    projectTierName: string // The name of the project tier
    parentTierId: string
    path?: string // Identifier of the parent tier to establish hierarchy
}

export interface ProjectManagmentStausListDataTypeInterface
    extends ProjectManagmentSatusFormDataInterface {
    key: React.Key
}
export interface ProjectManagmentSatusFormDataInterface {
    projectStatusId: string
    projectId: string
    projectStatusName: string
    defaultAssigneeUserId: number
    colorCode: string
    sortingOrder: number
    defaultAssigneeUser: string
}
export interface ProjectManagmentNotificationFormDataInterface {
    projectStatusId: string
    projectNotificationForIds: number
    specificUserId: number
}
export interface ProjectManagmentTierPayloadInterface {
    data: ProjectManagmentTierFormDataInterface[]
    noOfRecords: number
}
export interface ProjectManagmentStausPayloadInterface {
    data: ProjectManagmentSatusFormDataInterface[]
    noOfRecords: number
}

export interface ProjectsManagmentStateInterface {
    categoryDropDownList: ListFrontEndInterface[]
    departmentDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
}
export interface stusStateinterface {
    userList: ListFrontEndInterface[]
}
export interface FirstPagePropss extends ProjectsManagmentStateInterface {
    editData: ProjectManagmentSatusFormDataInterface
    onSave: (callBack: CallableFunction) => void
}
export interface CheckboxState {
    assigneeUser: boolean
    reportingUser: boolean
    specificUser: boolean
    projectAssigneeUser: boolean
    projectLeadUser: boolean
    currentStatusAssignee: boolean
    movingStatusAssignee: boolean
}
export interface SaveProject {
    projectId: number
    projectPrefix: string
    projectName: string
    departmentId: number
    projectDescription: string
    projectStartDate: string
    projectEndDate: string
    clientCategoryId: number
    assignToUserId: number
    projectLeadUserId: number
}
