import * as i0 from '@angular/core';
import { Injector } from '@angular/core';
import * as i1 from '@angular/common';
import { AXPEntityModel, AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityPreloadEntity } from '@acorex/platform/layout/entity';
import { AXPEntity, AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult } from '@acorex/platform/common';
import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex/platform/auth';
import { AXRange } from '@acorex/cdk/common';

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

declare const RootConfig: {
    config: {
        i18n: string;
        module: string;
    };
    module: {
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        calendar: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        calendarEvent: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        calendarEventType: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
};

interface AXMCalendarManagementCalendarEventTypeEntityModel extends AXPEntityModel<string> {
    title: string;
    description?: string;
    isHoliday?: boolean;
    color: string;
    icon?: string;
    isActive: boolean;
    isDefault: boolean;
    order: number;
}

interface AXMCalendarManagementCalendarEventEntityModel extends AXPEntityModel<string> {
    calendarId: string;
    title: string;
    description?: string;
    typeId: string;
    date: Date;
    isRecurring: boolean;
    recurrenceRule?: string;
    isActive: boolean;
    order: number;
    calendar?: {
        id: string;
        title: string;
    };
    type?: {
        id: string;
        title: string;
        color: string;
        icon?: string;
        isHoliday?: boolean;
    };
}

interface AXMCalendarManagementCalendarEntityModel extends AXPEntityModel<string> {
    name: string;
    title: string;
    description?: string;
    calendarTypeId: any;
    parentId?: string;
    weekends: string[];
    firstDayOfWeek: string;
    isActive: boolean;
}

declare function calendarEventTypeFactory(injector: Injector): Promise<AXPEntity | null>;

declare function calendarEventFactory(injector: Injector): Promise<AXPEntity | null>;

declare function calendarFactory(injector: Injector): Promise<AXPEntity | null>;

declare class AXMCalendarManagementEntityProvider implements AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader {
    private injector;
    preload(): AXPEntityPreloadEntity[];
    get(moduleName: string, entityName: string): Promise<AXPEntity | null>;
    list(): Promise<{
        name: string;
        module: string;
    }[]>;
}

declare class AXMCalendarManagementMenuProvider implements AXPMenuProvider {
    private entityService;
    provide(context: AXPMenuProviderContext): Promise<void>;
}

declare class AXMCalendarManagementPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
    private readonly translateService;
    define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
}

declare const AXMPermissionsKeys: {
    readonly CalendarManagement: {
        readonly Management: `${string}:manage`;
        readonly Calendar: {
            readonly Management: `${string}:Calendar:manage`;
            readonly View: `${string}:Calendar:view`;
            readonly Create: `${string}:Calendar:create`;
            readonly Update: `${string}:Calendar:update`;
            readonly Delete: `${string}:Calendar:delete`;
            readonly Admin: `${string}:Calendar:Admin`;
        };
        readonly CalendarEventType: {
            readonly Management: `${string}:CalendarEventType:manage`;
            readonly View: `${string}:CalendarEventType:view`;
            readonly Create: `${string}:CalendarEventType:create`;
            readonly Update: `${string}:CalendarEventType:update`;
            readonly Delete: `${string}:CalendarEventType:delete`;
        };
    };
};

declare class AXMCalendarManagementSearchCommandProvider extends AXPSearchCommandProvider {
    commands: AXPSearchResult[];
}

interface AXMCalendarManagementEvent {
    date: Date;
    type: {
        color: string;
        icon?: string;
        isHoliday?: boolean;
    };
    title: string;
    description?: string;
}
declare class AXMCalendarManagementService {
    private readonly entityService;
    private readonly calendarEventDataAccessor;
    private readonly calendarDataAccessor;
    getCalendars(): Promise<{
        id: string;
        title: string;
    }[]>;
    getEvents(range: AXRange<Date>, calendarIds?: string[]): Promise<AXMCalendarManagementEvent[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMCalendarManagementService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMCalendarManagementService>;
}

export { AXMCalendarManagementEntityProvider, AXMCalendarManagementMenuProvider, AXMCalendarManagementModule, AXMCalendarManagementPermissionDefinitionProvider, AXMCalendarManagementSearchCommandProvider, AXMCalendarManagementService, AXMPermissionsKeys, RootConfig, calendarEventFactory, calendarEventTypeFactory, calendarFactory };
export type { AXMCalendarManagementCalendarEntityModel, AXMCalendarManagementCalendarEventEntityModel, AXMCalendarManagementCalendarEventTypeEntityModel };
