import { type ListFrontEndInterface } from './CommonType'
import type { GeneralEvent } from './Event'
import { type propertyFormDataInterface } from './MiisngInformation/PropertyView'
import type { GetOverviewResponse } from './Overview'
import { type ProjectManagmentStausListDataTypeInterface } from './ProjectMangement'
import { type ApprovalHistory } from './ToApproveViewAll/Timesheet'

export interface HeadlineProps {
    greetingText: string
    backgroundImageUrl: string
    dashboardNewsInfo: DashboardNewsInfo[] | []
}

export interface GreetingInfo {
    greetingText: string
    lastLoginDate: string
    backgroundImageUrl: string
}

export interface DashboardNewsInfo {
    title: string
    description: string
    newsURL?: string
    newsDate?: string | Date
    articleId?: number
}

export interface DashboardServieGridList {
    serviceId: number
    serviceName: string
    taskInProgress: number
    taskOverDue: number
    clientInProgress: number
    clientOverDue: number
}

export interface LeaveApproval {
    approvalRequestId: number
    referenceId: number
    leaveType: string
    leaveMode: string
    leaveFrom: string
    leaveTo: string
    appliedOn: string
    description: string
    appliedBy: string
    coveringPerson: string
}

export interface CustomLeaveApproval {
    approvalRequestId: number
    referenceId?: number
    leaveType: string
    leaveMode: string
    leaveFrom?: string
    leaveTo?: string
    appliedOn: number
    leaveTypeColor?: string
    leaveTypeBackgroundColor?: string
    description: string
    appliedBy: string
    coveringPerson: string
}

export interface PermissionApproval {
    approvalRequestId: number
    referenceId: number
    startFrom: string
    startTime: string
    endTo: string
    endTime: string
    coveringRequired: number
    coveringFrom: string
    coveringStartTime: string
    coveringTo: string
    coveringEndTime: string
    appliedOn: string
    description: string
    appliedBy: string
}

export interface ApprovalTimesheet {
    approvalRequestId: number
    timeSheetId: number
    userName: string
    dateTime: string
    duration: string
    description: string
    submissionStatus: number
    approvalStatus: number
    createdDate: string
    submitedDate: string
    approvalHistoryList: ApprovalHistory[]
    currentApprovalStatus: number
}

export interface DashboardThingsToDoUserWise {
    userId: number
    staffName: string
    vat: number
    paye: number
    ct: number
    pension: number
    aa: number
    cs: number
    adhoc: number
    myTask: number
}

export interface StaffProgressProps {
    dashboardThingsToDoUserWiseList: DashboardThingsToDoUserWise[] | []
    userList: ListFrontEndInterface[]
}

export interface ApproveProps {
    leaveApprovalList: LeaveApproval[] | []
    permissionApprovalList: PermissionApproval[] | []
    approvalTimesheetList: ApprovalTimesheet[] | []
}

export interface PaidInvoiceSummaryProps {
    paidInvoiceSummaries: PaidInvoiceSummary[] | []
}

export interface PaidInvoiceSummary {
    description: string
    count: number
}

export interface MissedInformationInfo {
    missingFieldId: number
    missingFieldName: string
    missingFieldDescription: string
    sortOrder: number
    missingCount: number
}

export interface ClientRequestInfo {
    clientRequestId: number
    serviceId: number
    description: string
    attachmentUrl: string
    businessName: string
    requestDate: string
    requestNo: string
    serviceName: string
    colorCode: string
}

export interface GetDashboardResponse {
    greetingInfo: GreetingInfo | null
    dashboardNewsInfo?: DashboardNewsInfo[] | []
    productivityTargetHours: number[][] | []
    productivityWorkedHours: number[][] | []
    productivityUserLoggedIn: number[][] | []
    leaveApprovalList: LeaveApproval[] | []
    permissionApprovalList: PermissionApproval[] | []
    approvalTimesheetList: ApprovalTimesheet[] | []
    taskthingstodoInProgressList: string[][] | []
    taskthingstodoOverDueList: string[][] | []
    clientthingstodoInProgressList: string[][] | []
    clientthingstodoOverDueList: string[][] | []
    taskthingstofollowInProgressList: string[][] | []
    taskthingstofollowOverDueList: string[][] | []
    clientthingstofollowInProgressList: string[][] | []
    clientthingstofollowOverDueList: string[][] | []
    dashboardServieGridList: DashboardServieGridList[] | []
    dashboardThingsToDoUserWiseList: DashboardThingsToDoUserWise[] | []
    paidInvoiceSummary: PaidInvoiceSummary[] | []
    missedInformationInfo: MissedInformationInfo[] | []
    clientRequestInfo: ClientRequestInfo[] | []
}

export interface InitialStateInterface {
    dashboard: GetDashboardResponse | null
    overview: GetOverviewResponse | null
    eventListByUser: GeneralEvent[] | []
    itdashboard: GetITDashboardResponse | null
}

export interface ToFollowProps {
    taskthingstofollowInProgressList: string[][] | []
    taskthingstofollowOverDueList: string[][] | []
    clientthingstofollowInProgressList: string[][] | []
    clientthingstofollowOverDueList: string[][] | []
}

export interface ToDoProps {
    taskthingstodoInProgressList: string[][] | []
    taskthingstodoOverDueList: string[][] | []
    clientthingstodoInProgressList: string[][] | []
    clientthingstodoOverDueList: string[][] | []
    dashboardServieGridList: DashboardServieGridList[] | []
}

export interface MissingInformationStateInterface {
    MissinginformationprpertyviewList: propertyFormDataInterface[] | []
}

export interface misingInfoTable {
    companyName: string
}

export interface GetITDashboardResponse {
    greetingInfo?: GreetingInfo | null
    dashboardNewsInfo?: DashboardNewsInfo[] | []
    clientInfo: ItclientInfo[] | []
    projectInfo?: ItprojectInfo[] | []
}

export interface ItclientInfo {
    clientType: string
    noOfClient: number
}

export interface ItprojectInfo {
    projectId: number
    projectName: string
}

export interface GetITTofollowProps {
    projectInfo: ItprojectInfo[] | []
    ProjectManagmentStausList?: ProjectManagmentStausListDataTypeInterface[]
}

export interface GetITTofollowState {
    ProjectManagmentStausList: ProjectManagmentStausListDataTypeInterface[]
}
