import { type ListFrontEndInterface } from '../CommonType'
import {
    type ProjectManagmentTierListDataTypeInterface,
    type ProjectManagmentFormDataInterface,
    type ProjectManagmentStausListDataTypeInterface,
} from '../ProjectMangement'

export interface TaskFormDataStateInterface {
    userList: ListFrontEndInterface[]
    taskDetailsList: TaskData[]
    taskDetailsListCount: number
    userimageList: User[]
    userimageListCount: number
    satusList: ListFrontEndInterface[]
    ProjectManagmentStausList: ProjectManagmentStausListDataTypeInterface[]
    projectDropDownList: ListFrontEndInterface[]
    allDepartmentList: ListFrontEndInterface[]
}

export interface todoForminterface extends todoSatteInterface {
    // taskDetailsList: TaskData[]
    setSelectedTaskIds: (id: string) => void
    AssignBY: number
    AssignTo: number
    selectedProjectID: number
    activeItDepartment: boolean
    activeTab: string
    searchString: string
    createTaskModalStatus: boolean
}

export interface inprogressForminterface extends inprogressSatteInterface {
    // taskDetailsList: TaskData[]
    setSelectedTaskIds: (id: string) => void
    AssignBY: number
    AssignTo: number
    selectedProjectID: number
    activeItDepartment: boolean
    activeTab: string
    searchString: string
    createTaskModalStatus: boolean
}

export interface todoSatteInterface {
    userList: ListFrontEndInterface[]
    taskDetailsListCount: number
    userimageList: User[]
    projectDropDownList: ListFrontEndInterface[]
    ProjectManagmentStausList: ProjectManagmentStausListDataTypeInterface[]
    taskDetailsList: TaskData[]
}

export interface inprogressSatteInterface {
    userList: ListFrontEndInterface[]
    taskDetailsListCount: number
    userimageList: User[]
    projectDropDownList: ListFrontEndInterface[]
    ProjectManagmentStausList: ProjectManagmentStausListDataTypeInterface[]
    ProjectManagmentStausListInprogress: TaskData[]
}
export interface taskstate {
    userList: ListFrontEndInterface[]
    priorityDropDownList: ListFrontEndInterface[]
    clientDropDownList: CorporateEntity[]
    ProjectManagmentList: ProjectManagmentFormDataInterface[]
    projectDropDownList: ListFrontEndInterface[]
    allDepartmentList: ListFrontEndInterface[]
    ProjectManagmentTierList: ProjectManagmentTierListDataTypeInterface[]
}
export interface tasksatestate {
    userList: ListFrontEndInterface[]
    priorityDropDownList: ListFrontEndInterface[]
    clientDropDownList: CorporateEntity[]
    ProjectManagmentList: ProjectManagmentFormDataInterface[]
    projectDropDownList: ListFrontEndInterface[]
    allDepartmentList: ListFrontEndInterface[]
    ProjectManagmentTierList: ProjectManagmentTierListDataTypeInterface[]
    editData: setTasks
    onSave: (callBack: CallableFunction) => void
    resetdata: string
    setResetData: React.Dispatch<React.SetStateAction<string>>
}
export interface Cretetasinterface {
    taskDetailsList: TaskData[]
    taskDetailsListCount: number
}
export interface subtaskinterface {
    subtaskDetailsList: subtaskDetailsListDataTypeInterface[]
    subtaskDetailsListCount: number
    SubViewDetail: TaskData[]
    userimageList: User[]
    priorityDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
}
export interface subtaskinterfaces {
    subtaskDetailsList: subtaskDetailsListDataTypeInterface[]
    subtaskDetailsListCount: number
    SubViewDetail: TaskData[]
    userimageList: User[]
    priorityDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
}
export interface taskDetailsListDataTypeInterface extends TaskData {
    key: React.Key
}
export interface subtaskDetailsListDataTypeInterface extends subTaskData {
    key: React.Key
}
export interface subTaskData {
    subTaskId: string
    subTaskName: string
    toDate: string
    priorityId: number
    assignedTo: number
    description: string
}
export interface taskDetailsFormDataInterface {
    taskId: string
    taskNo: number
    taskName: string
    priorityId: number
    sortOrder: number
    taskType: number
    businessType: number
    referenceId: number
    serviceId: number
    serviceReferenceId: number
    assignedBy: number
    assignedTo: number
    fromDate: string
    toDate: string
    statusId: number
    notifyToStatusChange: number
    description: string
    clientName: string
    recurringFrequency: number
    recurringFrequencyType: number
    recurringFrequencyPeriodId: number
    recurringEnds: number
    recurringOccurrence: number
    recurringEndsOn: string
    isRepeatOnSun: number
    isRepeatOnMon: number
    isRepeatOnTue: number
    isRepeatOnWed: number
    isRepeatOnThu: number
    isRepeatOnFri: number
    isRepeatOnSat: number
    projectTierId: number
    projectTierInfo: string
}

export interface taskPayloadInteface {
    data: TaskData[]
    noOfRecords: number
}
export interface subtaskPayloadInteface {
    data: subTaskData[]
    noOfRecords: number
}
export interface tasktFormInterface extends taskstate {
    onSave: (
        data: taskDetailsFormDataInterface,
        callBack: CallableFunction
    ) => void
    editData: Task
}
export interface CorporateEntity {
    id: string
    identifier: string
    displayName: string
    displayImageURL: string
    additionalDataOne: string
    additionalDataTwo: string
    additionalDataThree: string
    additionalDataFour: string
    additionalDataFive: string
}

export interface Task {
    taskId: string
    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: SubTaskView[]
    taskFollowerViews: TaskFollowerView[]
    subTaskStatus: number
    isNewChatExist: number
    projectTierInfo: string

    projectStatusId: number
    projectStatusLbl: string

    userStatusId: number
    userStatusLbl: string
}
export interface SubTaskView {
    subTaskId: number
    subTaskNo: string
    subTaskName: string
    taskId: string
    taskName: string
    priorityName: string
    taskTypeName: string
    sortOrder: number
    description: string | null
    assignedByName: string
    assignedToName: string
    fromDate: string // Assuming date format, consider using Date type if applicable
    toDate: string // Assuming date format, consider using Date type if applicable
    daysCount: number
    daysColourCode: string
    status: string
    notifyToStatusChange: number
    projectTierInfo: string // You might want to define a specific type for this
}

export interface TaskFollowerView {
    taskFollowerId: number
    taskId: string
    followerId: number
    followerName: string
    followerImageURL: string
}

export interface TaskData {
    taskId: string
    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 // Assuming date format, consider using Date type if applicable
    toDate: string // Assuming date format, consider using Date type if applicable
    daysCount: number
    daysColourCode: string
    status: string
    statusColourCode: string
    notifyToStatusChange: number
    subTaskViews: SubTaskView[]
    taskFollowerViews: TaskFollowerView[]
    subTaskStatus: number
    isNewChatExist: number
    projectTierInfo: any | null // You might want to define a specific type for this
    projectStatusId: number
    projectStatusLbl: string
    projectName: string
    projectId: string
    userStatusId: number
    userStatusLbl: string
    businessTypeId: number
    referenceId: number
}
export interface TaskFollowerRequestBody {
    taskFollowerId: number
    taskId: string
    followerIds: number[]
}
export interface TaskFollowerRequestBodysform {
    userList: ListFrontEndInterface[]
    follwersList: TaskFollowerRequestBody[]
    follwersListCount: number
}
export interface TaskFollowersRequestBodysform {
    follwersList: TaskFollowerRequestBody[]
    follwersListCount: number
}

export interface FirstPagePropss extends TaskFollowersRequestBodysform {
    userList: ListFrontEndInterface[]

    onSave: (callBack: CallableFunction) => void
}
export interface followersListDataTypeInterface
    extends TaskFollowerRequestBody {
    key: React.Key
}
export interface follwersPayloadInterface {
    data: TaskFollowerRequestBody[]
    noOfRecords: number
}
export interface TaskHourssRequestBodysform {
    hoursList: TaskHours[]
    hoursListCount: number
}
export interface TaskHours {
    taskHoursId: number
    taskId: number
    startDate: string
    startTime: string
    endTime: string
    duration: string
    description: string
}
export interface FirsthoursPagePropss extends TaskHourssRequestBodysform {
    onSave: (callBack: CallableFunction) => void
}
export interface hoursListDataTypeInterface extends TaskHours {
    key: React.Key
}
export interface hourssPayloadInterface {
    data: TaskHours[]
    noOfRecords: number
}
export interface taskimagelist {
    userimageList: User[]
    userimageListCount: number
}
export interface User {
    userId: number
    userName: string
    emailAddress: string
    contactNo: string
    imageUrl: string
}
export interface UserListDataTypeInterface extends User {
    key: React.Key
}
export interface UserListPayloadInterface {
    data: User[]
    noOfRecords: number
}
export interface TaskAttachment {
    taskAttachmentId: string
    taskId: string
    attachmentFile: string
    description: string
}

export interface TaskAttachmentinterface {
    TaskAttachmentList: TaskAttachment[]
    TaskAttachmentListCount: number
}

export interface chatInterface {
    TaskAttachmentListCount: number
}

export interface TaskAttachmentDataTypeInterface extends TaskAttachment {
    key: React.Key
}
export interface TaskAttachmentPayloadInterface {
    data: TaskAttachment[]
    noOfRecords: number
}

export interface ceteteclient {
    otherCompanyId: number
    title: string
    firstName: string
    middleName: string
    surName: string
    companyName: string
    referredBy: string
    mobileNumber: string
    emailAddress: string
    address1: string
    address2: string
    town: string
    postCode: string
    country: string
    attachment: string
    isActive: string
}
export interface clientssFormStateInterface {
    onClose?: () => void
    onSave?: (callBack: CallableFunction) => void
    editData?: ceteteclient
    countryList: ListFrontEndInterface[]
    createadocclientList: adhocclientListDataTypeInterface[]
    createadocclientListCount: number
}
export interface clientFormStateInterface {
    countryList: ListFrontEndInterface[]
    createadocclientList: adhocclientListDataTypeInterface[]
    createadocclientListCount: number
    categoryDropDownList: ListFrontEndInterface[]
}
export interface clientFormlistStateInterface {
    selectedCategoryId: number
    selectedServiceId: number
    createadocclientList: adhocclientListDataTypeInterface[]
    createadocclientListCount: number
}

export interface clientsFormStateInterface {
    createadocclientList: adhocclientListDataTypeInterface[]
    createadocclientListCount: number
}

export interface HelpDeskChatInterface extends HelpDeskChatStateInterface {
    taskId: number
    messageTypeId: number
    businessId: number
    referenceId: number
}

export interface HelpDeskChatStateInterface {
    userList: ListFrontEndInterface[]
}
export interface adhocclientListDataTypeInterface extends ceteteclient {
    key: React.Key
}
export interface adhocclientPayloadInteface {
    data: ceteteclient[]
    noOfRecords: number
}

export interface setTasks {
    taskId: number
    taskNo: string
    taskName: string
    priorityId: number | null
    sortOrder: number
    taskType: number
    businessType: number
    referenceId: number
    serviceId: number
    serviceReferenceId: number
    assignedBy: number
    assignedTo: number
    fromDate: string
    toDate: string
    statusId: number
    notifyToStatusChange: number
    description: string
    clientName: string
    recurringFrequency: number
    recurringFrequencyType: number
    recurringFrequencyPeriodId: number
    recurringEnds: number
    recurringOccurrence: number
    recurringEndsOn: string
    isRepeatOnSun: number
    isRepeatOnMon: number
    isRepeatOnTue: number
    isRepeatOnWed: number
    isRepeatOnThu: number
    isRepeatOnFri: number
    isRepeatOnSat: number
    projectTierId: number
    projectId: number
    departmentId: number
    sprintId: number
}
