import * as _angular_forms from '@angular/forms';
import { ControlValueAccessor, Validator, ValidatorFn, ValidationErrors } from '@angular/forms';
import * as i0 from '@angular/core';
import { OnInit, OnChanges, TemplateRef, SimpleChanges, EventEmitter } from '@angular/core';
import { CronExpressionParser } from 'cron-parser';
import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { NzCronExpressionI18nInterface, NzCronExpressionLabelI18n, NzCronExpressionCronErrorI18n } from 'ng-zorro-antd/i18n';
import * as ng_zorro_antd_cron_expression from 'ng-zorro-antd/cron-expression';

/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
type TimeType = keyof Cron;
interface Cron {
    second?: CronValue;
    minute?: CronValue;
    hour?: CronValue;
    day?: CronValue;
    month?: CronValue;
    week?: CronValue;
}
type CronValue = '*' | `${number}` | `${number}-${number}` | `${number}/${number}` | string;
interface CronChangeType {
    label: TimeType;
    value: CronValue;
}
type NzCronExpressionSize = 'large' | 'default' | 'small';
type NzCronExpressionType = 'linux' | 'spring';

declare class NzCronExpressionComponent implements OnInit, OnChanges, ControlValueAccessor, Validator {
    private readonly formBuilder;
    private readonly cdr;
    private readonly i18n;
    private readonly destroyRef;
    nzSize: NzCronExpressionSize;
    nzType: NzCronExpressionType;
    nzCollapseDisable: boolean;
    nzExtra?: TemplateRef<void> | null;
    nzSemantic: TemplateRef<void> | null;
    nzBorderless: boolean;
    nzDisabled: boolean;
    locale: NzCronExpressionI18nInterface;
    focus: boolean;
    labelFocus: TimeType | null;
    labels: TimeType[];
    interval: ReturnType<typeof CronExpressionParser.parse>;
    nextTimeList: Date[];
    private isNzDisableFirstChange;
    protected readonly cronValidatorFn: ValidatorFn;
    protected readonly form: _angular_forms.FormGroup<{
        second: _angular_forms.FormControl<string>;
        minute: _angular_forms.FormControl<string>;
        hour: _angular_forms.FormControl<string>;
        day: _angular_forms.FormControl<string>;
        month: _angular_forms.FormControl<string>;
        week: _angular_forms.FormControl<string>;
    }>;
    onChange: NzSafeAny;
    onTouch: () => void;
    convertFormat(value: string): void;
    writeValue(value: string | null): void;
    registerOnChange(fn: NzSafeAny): void;
    registerOnTouched(fn: NzSafeAny): void;
    validate(): ValidationErrors | null;
    setDisabledState(isDisabled: boolean): void;
    ngOnInit(): void;
    ngOnChanges(changes: SimpleChanges): void;
    private cronFormType;
    previewDate(value: Cron): void;
    loadMorePreview(): void;
    focusEffect(value: TimeType): void;
    blurEffect(): void;
    getValue(item: CronChangeType): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionComponent, "nz-cron-expression", ["nzCronExpression"], { "nzSize": { "alias": "nzSize"; "required": false; }; "nzType": { "alias": "nzType"; "required": false; }; "nzCollapseDisable": { "alias": "nzCollapseDisable"; "required": false; }; "nzExtra": { "alias": "nzExtra"; "required": false; }; "nzSemantic": { "alias": "nzSemantic"; "required": false; }; "nzBorderless": { "alias": "nzBorderless"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; }, {}, never, never, true, never>;
    static ngAcceptInputType_nzCollapseDisable: unknown;
    static ngAcceptInputType_nzBorderless: unknown;
    static ngAcceptInputType_nzDisabled: unknown;
}

declare class NzCronExpressionLabelComponent {
    type: TimeType;
    locale: NzCronExpressionLabelI18n;
    labelFocus: string | null;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionLabelComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionLabelComponent, "nz-cron-expression-label", ["nzCronExpressionLabel"], { "type": { "alias": "type"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "labelFocus": { "alias": "labelFocus"; "required": false; }; }, {}, never, never, true, never>;
}

declare class NzCronExpressionInputComponent {
    value: string;
    label: TimeType;
    disabled: boolean;
    readonly focusEffect: EventEmitter<keyof ng_zorro_antd_cron_expression.Cron>;
    readonly blurEffect: EventEmitter<void>;
    readonly getValue: EventEmitter<CronChangeType>;
    focusInputEffect(event: FocusEvent): void;
    blurInputEffect(): void;
    setValue(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionInputComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionInputComponent, "nz-cron-expression-input", ["nzCronExpressionInput"], { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "focusEffect": "focusEffect"; "blurEffect": "blurEffect"; "getValue": "getValue"; }, never, never, true, never>;
    static ngAcceptInputType_disabled: unknown;
}

declare class NzCronExpressionPreviewComponent {
    private cdr;
    TimeList: Date[];
    visible: boolean;
    locale: NzCronExpressionCronErrorI18n;
    nzSemantic: TemplateRef<void> | null;
    readonly loadMorePreview: EventEmitter<void>;
    isExpand: boolean;
    setExpand(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionPreviewComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionPreviewComponent, "nz-cron-expression-preview", ["nzCronExpressionPreview"], { "TimeList": { "alias": "TimeList"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "nzSemantic": { "alias": "nzSemantic"; "required": false; }; }, { "loadMorePreview": "loadMorePreview"; }, never, never, true, never>;
    static ngAcceptInputType_visible: unknown;
}

declare class NzCronExpressionModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<NzCronExpressionModule, never, [typeof NzCronExpressionComponent, typeof NzCronExpressionLabelComponent, typeof NzCronExpressionInputComponent, typeof NzCronExpressionPreviewComponent], [typeof NzCronExpressionComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<NzCronExpressionModule>;
}

export { NzCronExpressionComponent, NzCronExpressionModule };
export type { Cron, CronChangeType, CronValue, NzCronExpressionSize, NzCronExpressionType, TimeType };
