import * as polytype from 'polytype';
import * as i0 from '@angular/core';
import { TemplateRef, EventEmitter, AfterViewInit } from '@angular/core';
import { MXBaseComponent, AXItemClickEvent, AXRangeChangedEvent, MXValueComponent, AXRange, MXInteractiveComponent, AXClickEvent, MXComponentOptionChanged } from '@acorex/cdk/common';
import { AXCalendarService, AXDateTimeRange, AXDateTime } from '@acorex/core/date-time';
import { AXLocaleService } from '@acorex/core/locale';
import { AXTranslationService } from '@acorex/core/translation';

type AXCalendarViewType = 'year' | 'month' | 'day';
type AXCalendarViewDepth = AXCalendarViewType;
type AXCalendarDisabledDates = Date[] | ((date: Date) => boolean);
type AXCalendarHolidayDates = Date[] | ((date: Date) => boolean);
type AXCalendarCellCssClass = string | {
    [key: string]: boolean;
} | ((date: Date) => string);
type AXDateTimePickerType = 'date' | 'time' | 'datetime';
/**
 *  Contains native event
 * @category Events
 */
declare class AXCalendarNavigateEvent extends AXRangeChangedEvent<Date> {
}
/**
 *  Contains native event
 * @category Events
 */
declare class AXCalendarSlotClick extends AXItemClickEvent<Date> {
}
interface AXCalendarViewSlot {
    date: AXDateTime;
    text: string;
    tooltip: string;
    today: boolean;
    selected: boolean;
    disabled: boolean;
    cssClass: {
        [key: string]: boolean;
    };
}
interface AXCalendarView {
    range: AXDateTimeRange;
    slots: AXCalendarViewSlot[];
}
declare class MXCalendarBaseComponent extends MXBaseComponent {
    protected localeService: AXLocaleService;
    protected calendarService: AXCalendarService;
    protected translateService: AXTranslationService;
    interface: 'calendar' | 'picker';
    /**
     * @deprecated
     * use dayCellTemplate, monthCellTemplate, yearCellTemplate instead
     */
    cellTemplate?: TemplateRef<unknown>;
    dayCellTemplate?: TemplateRef<unknown>;
    monthCellTemplate?: TemplateRef<unknown>;
    yearCellTemplate?: TemplateRef<unknown>;
    cellClass?: AXCalendarCellCssClass;
    showNavigation: boolean;
    count: number;
    onSlotClick: EventEmitter<AXCalendarSlotClick>;
    onNavigate: EventEmitter<AXCalendarNavigateEvent>;
    activeViewChange: EventEmitter<AXCalendarViewType>;
    private _activeView;
    get activeView(): AXCalendarViewType;
    set activeView(v: AXCalendarViewType);
    typeChange: EventEmitter<string>;
    private _type;
    /**
     * @deprecated use calendar input instead
     */
    get type(): string;
    set type(v: string);
    depthChange: EventEmitter<AXCalendarViewDepth>;
    private _depth;
    get depth(): AXCalendarViewDepth;
    set depth(v: AXCalendarViewDepth);
    minValueChange: EventEmitter<Date>;
    private _minValue;
    get minValue(): Date;
    set minValue(v: Date);
    maxValueChange: EventEmitter<Date>;
    private _maxValue;
    get maxValue(): Date;
    set maxValue(v: Date);
    disabledDatesChange: EventEmitter<AXCalendarDisabledDates>;
    private _disabledDates;
    get disabledDates(): AXCalendarDisabledDates;
    set disabledDates(v: AXCalendarDisabledDates);
    holidayDatesChange: EventEmitter<AXCalendarHolidayDates>;
    private _holidayDates;
    get holidayDates(): AXCalendarHolidayDates;
    set holidayDates(v: AXCalendarHolidayDates);
    render(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<MXCalendarBaseComponent, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MXCalendarBaseComponent>;
}
declare const CALENDAR_INPUTS: string[];
declare const CALENDAR_OUTPUTS: string[];

declare const AXCalendarRangeComponent_base: polytype.Polytype.ClusteredConstructor<[{
    new (): MXValueComponent<AXRange<Date>>;
    ɵfac: i0.ɵɵFactoryDeclaration<MXValueComponent<any>, never>;
    ɵprov: i0.ɵɵInjectableDeclaration<MXValueComponent<any>>;
}, typeof MXInteractiveComponent, typeof MXCalendarBaseComponent]>;
declare class AXCalendarRangeComponent extends AXCalendarRangeComponent_base implements AfterViewInit {
    private formatService;
    private unsubscriber;
    protected calendar: i0.WritableSignal<string>;
    /**
     *  @ignore
     */
    private _calendarService;
    private _c1;
    private _c2;
    _navText: string;
    /**
     *  @ignore
     */
    private _navUserInteraction;
    /**
     *  @ignore
     */
    constructor();
    /**
     *  @ignore
     */
    protected ngOnInit(): void;
    /**
     *  @ignore
     */
    ngAfterViewInit(): void;
    internalValueChanged(value: any): void;
    /** w
     *  @ignore
     */
    getCellClass: (date: AXDateTime) => "ax-range-start" | "ax-range-end" | "ax-range-between";
    /**
     *  @ignore
     */
    protected handleSlotClick(e: AXCalendarSlotClick): void;
    /**
     *  @ignore
     */
    protected handlePrevClick(): void;
    /**
     *  @ignore
     */
    protected handleNextClick(): void;
    /**
     *  @ignore
     */
    protected handleNavClick(): void;
    /**
     *  @ignore
     */
    private _syncNavText;
    /**
     *  @ignore
     */
    protected handleNavigate(): void;
    /**
     *  @ignore
     */
    protected handleActiveViewChange1(): void;
    /**
     *  @ignore
     */
    protected handleActiveViewChange2(): void;
    /**
     *  @ignore
     */
    private _syncNav1;
    /**
     *  @ignore
     */
    private _syncNav2;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarRangeComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXCalendarRangeComponent, "ax-calendar-range", never, { "rtl": { "alias": "rtl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "holidayDates": { "alias": "holidayDates"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dayCellTemplate": { "alias": "dayCellTemplate"; "required": false; }; "monthCellTemplate": { "alias": "monthCellTemplate"; "required": false; }; "yearCellTemplate": { "alias": "yearCellTemplate"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; }, { "onOptionChanged": "onOptionChanged"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "depthChange": "depthChange"; "typeChange": "typeChange"; "activeViewChange": "activeViewChange"; "disabledDatesChange": "disabledDatesChange"; "holidayDatesChange": "holidayDatesChange"; "onNavigate": "onNavigate"; "onSlotClick": "onSlotClick"; }, never, ["*"], true, never>;
}

declare const AXCalendarComponent_base: polytype.Polytype.ClusteredConstructor<[{
    new (): MXValueComponent<Date>;
    ɵfac: i0.ɵɵFactoryDeclaration<MXValueComponent<any>, never>;
    ɵprov: i0.ɵɵInjectableDeclaration<MXValueComponent<any>>;
}, typeof MXInteractiveComponent, typeof MXCalendarBaseComponent]>;
/**
 * A calendar component that provides a customizable calendar view with various options for selection, navigation, and styling.
 *
 * @category Components
 */
declare class AXCalendarComponent extends AXCalendarComponent_base implements AfterViewInit {
    private formatService;
    weekend: i0.InputSignal<number[]>;
    weekdays: i0.InputSignal<number[]>;
    protected calendar: i0.WritableSignal<string>;
    get displayRange(): AXDateTimeRange | null;
    /**
     *  @ignore
     */
    protected _today: AXDateTime;
    /**
     *  @ignore
     */
    private _viewStartDate;
    /**
     *  @ignore
     */
    private _navUserInteraction;
    /**
     *  @ignore
     */
    private _footPrint;
    /**
     *  @ignore
     */
    protected views: AXCalendarView[];
    /**
     *  @ignore
     */
    protected _weekdays: number[];
    /**
     *  @ignore
     */
    private oldValue;
    /**
     *  @ignore
     */
    private _initValues;
    /**
     *  @ignore
     */
    private _refresh;
    /**
     *  @ignore
     */
    constructor();
    /**
     *  @ignore
     */
    protected ngOnInit(): void;
    /**
     *  @ignore
     */
    ngAfterViewInit(): void;
    /**
     *  @ignore
     */
    render(): void;
    /**
     *  @ignore
     */
    private _setDisplayRange;
    /**
     *  @ignore
     */
    private dayView;
    /**
     *  @ignore
     */
    private monthView;
    /**
     *  @ignore
     */
    private yearView;
    /**
     *  @ignore
     */
    protected _handlePrevClick(): void;
    /**
     *  @ignore
     */
    protected _handleNextClick(): void;
    /**
     *  @ignore
     */
    protected _handleSlotClick(e: MouseEvent, slot: AXCalendarViewSlot): void;
    /**
     *  @ignore
     */
    protected _handleNavClick(e: AXClickEvent | any, view: AXCalendarViewType): void;
    /**
     * Toggles between different calendar views (day → month → year).
     */
    toggleView(): void;
    /**
     *  @ignore
     */
    protected internalOptionChanged(e: MXComponentOptionChanged): void;
    /**
     *  @ignore
     */
    protected internalSetValue(value: Date): Date | null;
    /**
     *  @ignore
     */
    protected internalValueChanged(value?: Date): void;
    /**
     *  @ignore
     */
    protected _handleGoToday(): void;
    /**
     * Navigates forward in the calendar based on the current active view and the configured count.
     *
     * Behavior by view:
     * - day view: advances by count months
     * - month view: advances by count years
     * - year view: advances by 10 × count years
     *
     * @returns void
     */
    next(): void;
    /**
     * Navigates backward in the calendar based on the current active view and the configured count.
     *
     * Behavior by view:
     * - day view: goes back by count months
     * - month view: goes back by count years
     * - year view: goes back by 10 × count years
     *
     * @returns void
     */
    prev(): void;
    /**
     * Sets focus to the currently selected calendar slot or the first available slot.
     *
     * @returns void
     */
    focus(): void;
    /**
     *  @ignore
     */
    private _navNextPrev;
    /**
     * Navigates to the current date and emits the navigation event.
     *
     * @returns void
     */
    goToday(): void;
    /**
     * Navigates to a specified date and updates the view.
     *
     * @param date The date to navigate to, which can be a Date object or an AXDateTime instance.
     * @returns void
     */
    navTo(date: Date | AXDateTime): void;
    /**
     *  @ignore
     */
    private get __hostClass();
    /**
     *  @ignore
     */
    private _setDate;
    /**
     *  @ignore
     */
    protected isDisabled(date: AXDateTime): boolean;
    /**
     *  @ignore
     */
    protected isHoliday(date: AXDateTime): boolean;
    /**
     *  @ignore
     */
    protected isWeekend(date: AXDateTime): boolean;
    /**
     *  @ignore
     */
    _handleOnKeydownEvent(e: KeyboardEvent): void;
    /**
     *  @ignore
     */
    protected getMonthName(date: AXDateTime, style: 'short' | 'long'): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXCalendarComponent, "ax-calendar", never, { "rtl": { "alias": "rtl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "holidayDates": { "alias": "holidayDates"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dayCellTemplate": { "alias": "dayCellTemplate"; "required": false; }; "monthCellTemplate": { "alias": "monthCellTemplate"; "required": false; }; "yearCellTemplate": { "alias": "yearCellTemplate"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; "count": { "alias": "count"; "required": false; }; "id": { "alias": "id"; "required": false; }; "weekend": { "alias": "weekend"; "required": false; "isSignal": true; }; "weekdays": { "alias": "weekdays"; "required": false; "isSignal": true; }; }, { "onOptionChanged": "onOptionChanged"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "minValueChange": "minValueChange"; "maxValueChange": "maxValueChange"; "onBlur": "onBlur"; "onFocus": "onFocus"; "depthChange": "depthChange"; "typeChange": "typeChange"; "activeViewChange": "activeViewChange"; "disabledDatesChange": "disabledDatesChange"; "holidayDatesChange": "holidayDatesChange"; "onNavigate": "onNavigate"; "onSlotClick": "onSlotClick"; "countChange": "countChange"; }, never, ["ax-header", "ax-footer"], true, never>;
}

declare class AXCalendarModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXCalendarModule, never, [typeof AXCalendarComponent, typeof AXCalendarRangeComponent], [typeof AXCalendarComponent, typeof AXCalendarRangeComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXCalendarModule>;
}

export { AXCalendarComponent, AXCalendarModule, AXCalendarNavigateEvent, AXCalendarRangeComponent, AXCalendarSlotClick, CALENDAR_INPUTS, CALENDAR_OUTPUTS, MXCalendarBaseComponent };
export type { AXCalendarCellCssClass, AXCalendarDisabledDates, AXCalendarHolidayDates, AXCalendarView, AXCalendarViewDepth, AXCalendarViewSlot, AXCalendarViewType, AXDateTimePickerType };
