import { AXPEntityModel } from '@acorex/platform/layout/entity';
import { AXPSystemStatuses } from '@acorex/platform/common';
import * as i0 from '@angular/core';
import { AXPTaskBadgeProvider, AXPResourceAppointmentBoardProvider, AXPResourceAppointmentBoardFilter, AXPResourceAppointmentResource, AXPResourceAppointmentStatus, AXPResourceAppointmentItem, AXPResourceAppointmentActionMenuItem } from '@acorex/platform/layout/components';
import { AXPExecuteCommand, AXPExecuteCommandResult, AXPFeatureDefinitionProvider, AXPFeatureDefinitionProviderContext, AXPModuleManifest } from '@acorex/platform/core';
import { AXPTaskPopoverComponent, AXPTask } from '@acorex/modules/task-management';
import * as i1 from '@angular/common';
import * as i2 from '@acorex/platform/runtime';

declare const RootConfig: {
    config: {
        i18n: string;
        module: string;
    };
    module: {
        route: string;
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        employee: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        employmentType: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        positionAssignment: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        leaveType: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        leaveRequest: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
    pages: {
        appointmentBoard: {
            path: string;
            title: string;
            icon: string;
        };
    };
};

interface AXMHumanCapitalManagementEmployeeEntityModel extends AXPEntityModel<string> {
    employeeCode: string;
    jobDefinitionId: string;
    positionId: string;
    employmentTypeId: string;
    hireDate: Date;
    contactId?: string;
    userId?: string;
    managerId?: string;
    manager?: AXMHumanCapitalManagementEmployeeEntityModel;
    personId?: string;
    person?: {
        id: string;
        displayName?: string;
    };
}

interface AXMHumanCapitalManagementEmploymentTypeEntityModel {
    id: string;
    title: string;
    description?: string;
}

type AXMHumanCapitalManagementLeaveRequestStatus = typeof AXPSystemStatuses.Pending.name | typeof AXPSystemStatuses.Approved.name | typeof AXPSystemStatuses.Rejected.name | typeof AXPSystemStatuses.Cancelled.name;
interface AXMHumanCapitalManagementLeaveRequestEntityModel extends AXPEntityModel<string> {
    employeeId: string;
    employee?: AXMHumanCapitalManagementEmployeeEntityModel;
    leaveTypeId: string;
    leaveType?: {
        id: string;
        title: string;
    };
    startDate: Date;
    endDate: Date;
    durationDays?: number;
    reason?: string;
    statusId?: AXMHumanCapitalManagementLeaveRequestStatus;
    status?: {
        id: AXMHumanCapitalManagementLeaveRequestStatus;
        title?: string;
    };
}

interface AXMHumanCapitalManagementLeaveTypeEntityModel extends AXPEntityModel<string> {
    title: string;
    description: string;
    color: string;
}

interface AXMHumanCapitalManagementPositionAssignmentEntityModel extends AXPEntityModel<string> {
    employeeId: string;
    positionId: string;
    scopeType: 'division' | 'department';
    scopeId: string;
    startDate: Date;
    endDate?: Date;
    isPrimary?: boolean;
    notes?: string;
}

declare class AXMLeaveRequestBadgeProvider extends AXPTaskBadgeProvider {
    private readonly entityService;
    private readonly leaveRequestData;
    private readonly commandEvents;
    private readonly destroyRef;
    key: string;
    count: i0.WritableSignal<number>;
    constructor();
    /**
     * Forces badge count recalculation by querying the leave request entity service.
     */
    refresh(): Promise<void>;
    /**
     * Handles command execution events and refreshes the badge when targeted leave request commands succeed.
     */
    private handleCommandEvent;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMLeaveRequestBadgeProvider, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMLeaveRequestBadgeProvider>;
}

declare class AXMLeaveRequestResourceAppointmentProvider extends AXPResourceAppointmentBoardProvider<AXMHumanCapitalManagementLeaveRequestEntityModel> {
    private readonly entityService;
    get name(): string;
    get title(): string;
    get icon(): string;
    getList(filter?: AXPResourceAppointmentBoardFilter): Promise<AXPResourceAppointmentResource[]>;
    getStatuses(): Promise<AXPResourceAppointmentStatus[]>;
    getActions(context?: AXPResourceAppointmentItem): Promise<AXPResourceAppointmentActionMenuItem[]>;
    executeCommand(command: AXPExecuteCommand): Promise<AXPExecuteCommandResult>;
}

interface LeaveRequestActionDialogResult {
    reason?: string;
    note?: string;
    cancelled: boolean;
}
declare class AXPLeaveRequestDialogService {
    private readonly layoutBuilder;
    private readonly translationService;
    showRejectionDialog(): Promise<LeaveRequestActionDialogResult>;
    showCancellationDialog(): Promise<LeaveRequestActionDialogResult>;
    showApprovalDialog(): Promise<LeaveRequestActionDialogResult>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXPLeaveRequestDialogService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXPLeaveRequestDialogService>;
}

declare class AXMLeaveRequestTaskPopoverComponent implements AXPTaskPopoverComponent {
    task: i0.InputSignal<AXPTask<Record<string, any>>>;
    private readonly commandExecutor;
    private readonly dialogService;
    protected taskData: i0.Signal<AXMHumanCapitalManagementLeaveRequestEntityModel>;
    protected employeeName: i0.Signal<string>;
    protected managerName: i0.Signal<string>;
    protected leaveType: i0.Signal<string>;
    protected canApprove: i0.Signal<boolean>;
    protected canReject: i0.Signal<boolean>;
    protected canCancel: i0.Signal<boolean>;
    protected formatDate(date: Date): string;
    protected calculateDuration(): number;
    protected handleApprove(): Promise<void>;
    protected handleReject(): Promise<void>;
    protected handleCancel(): Promise<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMLeaveRequestTaskPopoverComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXMLeaveRequestTaskPopoverComponent, "axm-leave-request-task-popover", never, { "task": { "alias": "task"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare const AXPHumanCapitalManagementFeatureKeys: {
    readonly EmployeeManagement: "HumanCapitalManagement:Feature:Employee.Management";
    readonly LeaveManagement: "HumanCapitalManagement:Feature:Leave.Management";
};

/**
 * Human Capital Management Feature Definition Provider.
 * Provides feature definitions for the Human Capital Management module.
 */
declare class AXPHumanCapitalManagementFeatureDefinitionProvider implements AXPFeatureDefinitionProvider {
    provide(context: AXPFeatureDefinitionProviderContext): Promise<void>;
}

declare class AXMLeaveRequestFeatureModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMLeaveRequestFeatureModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXMLeaveRequestFeatureModule, never, [typeof i1.CommonModule, typeof i2.AXPRuntimeModule], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXMLeaveRequestFeatureModule>;
}

declare class AXMHumanCapitalManagementModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMHumanCapitalManagementModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXMHumanCapitalManagementModule, never, [typeof i1.CommonModule, typeof i2.AXPRuntimeModule, typeof AXMLeaveRequestFeatureModule], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXMHumanCapitalManagementModule>;
}

/**
 * Human Capital Management Module Manifest.
 * Defines module metadata, features, and provider references.
 */
declare const HumanCapitalManagementManifest: AXPModuleManifest;

declare const AXPHumanCapitalManagementMenuKeys: {
    readonly Root: "HumanCapitalManagement:Menu";
    readonly Employees: "HumanCapitalManagement:Menu:Employees";
    readonly EmploymentTypes: "HumanCapitalManagement:Menu:EmploymentTypes";
    readonly Divider1: "HumanCapitalManagement:Menu:Divider1";
    readonly PositionAssignments: "HumanCapitalManagement:Menu:PositionAssignments";
    readonly Divider2: "HumanCapitalManagement:Menu:Divider2";
    readonly LeaveTypes: "HumanCapitalManagement:Menu:LeaveTypes";
    readonly LeaveRequests: "HumanCapitalManagement:Menu:LeaveRequests";
    readonly LeaveRequestBoard: "HumanCapitalManagement:Menu:LeaveRequestBoard";
};

declare const AXMPermissionsKeys: {
    HumanCapitalManagement: {
        Employee: {
            Management: string;
            View: string;
            Edit: string;
            Delete: string;
            Create: string;
        };
        EmploymentType: {
            Management: string;
            View: string;
            Edit: string;
            Delete: string;
            Create: string;
        };
        PositionAssignment: {
            Management: string;
            View: string;
            Edit: string;
            Delete: string;
            Create: string;
        };
        LeaveType: {
            Management: string;
            View: string;
            Edit: string;
            Delete: string;
            Create: string;
        };
        LeaveRequest: {
            Management: string;
            View: string;
            Edit: string;
            Delete: string;
            Create: string;
        };
    };
};

export { AXMHumanCapitalManagementModule, AXMLeaveRequestBadgeProvider, AXMLeaveRequestResourceAppointmentProvider, AXMLeaveRequestTaskPopoverComponent, AXMPermissionsKeys, AXPHumanCapitalManagementFeatureDefinitionProvider, AXPHumanCapitalManagementFeatureKeys, AXPHumanCapitalManagementMenuKeys, AXPLeaveRequestDialogService, HumanCapitalManagementManifest, RootConfig };
export type { AXMHumanCapitalManagementEmployeeEntityModel, AXMHumanCapitalManagementEmploymentTypeEntityModel, AXMHumanCapitalManagementLeaveRequestEntityModel, AXMHumanCapitalManagementLeaveRequestStatus, AXMHumanCapitalManagementLeaveTypeEntityModel, AXMHumanCapitalManagementPositionAssignmentEntityModel, LeaveRequestActionDialogResult };
