import { OnInit, TemplateRef } from '@angular/core';
import { AbstractControl, ControlValueAccessor, FormControl, FormGroup, FormGroupDirective, NgForm, ValidationErrors, Validator } from '@angular/forms';
import { ErrorStateMatcher, KbqTimeRangeLocaleConfig } from '@koobiq/components/core';
import { KbqTimepicker, TimeFormats } from '@koobiq/components/timepicker';
import { KbqRangeValue, KbqTimeRangeOptionContext, KbqTimeRangeRange, KbqTimeRangeType } from './types';
import * as i0 from "@angular/core";
interface FormValue<T> {
    type: FormControl<KbqTimeRangeType>;
    fromTime: FormControl<T>;
    fromDate: FormControl<T>;
    toTime: FormControl<T>;
    toDate: FormControl<T>;
}
declare class RangeErrorStateMatcher implements ErrorStateMatcher {
    isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean;
}
/** @docs-private */
export declare class KbqTimeRangeEditor<T> implements ControlValueAccessor, Validator, OnInit {
    private readonly timeRangeService;
    /** The maximum selectable date. */
    readonly maxDate: import("@angular/core").InputSignal<T | null>;
    /** The minimum selectable date. */
    readonly minDate: import("@angular/core").InputSignal<T | null>;
    /** Preset of selectable ranges */
    readonly availableTimeRangeTypes: import("@angular/core").InputSignal<KbqTimeRangeType[]>;
    /** Provided value of selected range */
    readonly rangeValue: import("@angular/core").InputSignal<Required<KbqRangeValue<T>>>;
    readonly showRangeAsDefault: import("@angular/core").InputSignal<boolean>;
    readonly localeConfiguration: import("@angular/core").InputSignal<KbqTimeRangeLocaleConfig>;
    /** Customizable option output */
    readonly optionTemplate: import("@angular/core").InputSignal<TemplateRef<KbqTimeRangeOptionContext> | undefined>;
    /** @docs-private */
    protected readonly isRangeVisible: import("@angular/core").Signal<boolean>;
    /** @docs-private */
    protected readonly timeRangeTypesWithoutRange: import("@angular/core").Signal<KbqTimeRangeOptionContext[]>;
    /** @docs-private */
    protected readonly timepickerList: import("@angular/core").Signal<readonly KbqTimepicker<T>[]>;
    /** @docs-private */
    protected readonly form: FormGroup<FormValue<T>>;
    /** @docs-private */
    protected readonly timepickerFormat = TimeFormats.HHmmss;
    /** @docs-private */
    protected readonly rangeStateMatcher: RangeErrorStateMatcher;
    private lastValidationErrorOnEmit;
    constructor();
    ngOnInit(): void;
    /** @docs-private */
    validate(): ValidationErrors | null;
    /** Implemented as part of ControlValueAccessor */
    writeValue(value?: KbqTimeRangeRange): void;
    /** @docs-private */
    onChange: (_value: KbqTimeRangeRange) => void;
    /** @docs-private */
    onTouch: () => void;
    /** Implemented as part of ControlValueAccessor */
    registerOnChange(fn: (value: KbqTimeRangeRange) => void): void;
    /** Implemented as part of ControlValueAccessor */
    registerOnTouched(fn: () => void): void;
    private mapTimeRange;
    private getFormattedOption;
    private concatControlValidationErrors;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimeRangeEditor<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRangeEditor<any>, "kbq-time-range-editor", never, { "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "availableTimeRangeTypes": { "alias": "availableTimeRangeTypes"; "required": false; "isSignal": true; }; "rangeValue": { "alias": "rangeValue"; "required": false; "isSignal": true; }; "showRangeAsDefault": { "alias": "showRangeAsDefault"; "required": true; "isSignal": true; }; "localeConfiguration": { "alias": "localeConfiguration"; "required": true; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}
export {};
