import { InjectionToken, OnInit, Provider, TemplateRef, WritableSignal } from '@angular/core';
import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
import { KbqTimeRangeLocaleConfig, PopUpPlacements, PopUpSizes } from '@koobiq/components/core';
import { KbqPopoverTrigger } from '@koobiq/components/popover';
import { KbqRangeValue, KbqTimeRangeCustomizableTitleContext, KbqTimeRangeOptionContext, KbqTimeRangeRange, KbqTimeRangeType } from './types';
import * as i0 from "@angular/core";
/** Localization configuration provider. */
export declare const KBQ_TIME_RANGE_LOCALE_CONFIGURATION: InjectionToken<KbqTimeRangeLocaleConfig>;
/** Utility provider for `KBQ_TIME_RANGE_LOCALE_CONFIGURATION`. */
export declare const kbqTimeRangeLocaleConfigurationProvider: (configuration: KbqTimeRangeLocaleConfig) => Provider;
export declare class KbqTimeRange<T> implements ControlValueAccessor, OnInit {
    private readonly timeRangeService;
    private readonly localeService;
    /** @docs-private */
    readonly ngControl: NgControl | null;
    /** The minimum selectable date. */
    readonly minDate: import("@angular/core").InputSignal<T | undefined>;
    /** The maximum selectable date. */
    readonly maxDate: import("@angular/core").InputSignal<T | undefined>;
    /** provided value of selected range */
    readonly defaultRangeValue: import("@angular/core").InputSignal<KbqRangeValue<T> | undefined>;
    /** Preset of selectable ranges */
    readonly availableTimeRangeTypes: import("@angular/core").InputSignal<KbqTimeRangeType[]>;
    /** Customizable trigger output */
    readonly titleTemplate: import("@angular/core").InputSignal<TemplateRef<KbqTimeRangeCustomizableTitleContext> | undefined>;
    /** Customizable option output */
    readonly optionTemplate: import("@angular/core").InputSignal<TemplateRef<KbqTimeRangeOptionContext> | undefined>;
    /** Whether to show popover with arrow */
    readonly arrow: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
    /**
     * Whether to show range in popover if not provided
     * @see availableTimeRangeTypes
     */
    readonly showRangeAsDefault: import("@angular/core").InputSignal<boolean>;
    /** Whether component should fallback to default value if null provided */
    readonly nonNullable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
    /** Emit value update if provided value via formControl wasn't valid */
    readonly valueCorrected: import("@angular/core").OutputEmitterRef<KbqTimeRangeRange>;
    /**
     * Used to calculate time range.
     * @docs-private */
    protected readonly normalizedDefaultRangeValue: import("@angular/core").Signal<{
        fromTime: T;
        fromDate: T;
        toTime: T;
        toDate: T;
    }>;
    /** @docs-private */
    protected readonly titleValue: WritableSignal<KbqTimeRangeRange | null>;
    /** @docs-private */
    protected readonly rangeEditorControl: FormControl<KbqTimeRangeRange>;
    /** @docs-private */
    protected readonly popoverSize = PopUpSizes.Medium;
    /** @docs-private */
    protected readonly popupPlacement = PopUpPlacements.BottomLeft;
    /** @docs-private */
    protected readonly localeConfiguration: WritableSignal<KbqTimeRangeLocaleConfig>;
    constructor();
    ngOnInit(): void;
    /** Implemented as part of ControlValueAccessor */
    writeValue(value: KbqTimeRangeRange | null): void;
    /** @docs-private */
    onApply(popover: KbqPopoverTrigger): void;
    /** @docs-private */
    onCancel(popover: KbqPopoverTrigger): void;
    onVisibleChange(isVisible: boolean): 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 handleAvailableTypesChange;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimeRange<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRange<any>, "kbq-time-range", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "defaultRangeValue": { "alias": "defaultRangeValue"; "required": false; "isSignal": true; }; "availableTimeRangeTypes": { "alias": "availableTimeRangeTypes"; "required": false; "isSignal": true; }; "titleTemplate": { "alias": "titleTemplate"; "required": false; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; "arrow": { "alias": "arrow"; "required": false; "isSignal": true; }; "showRangeAsDefault": { "alias": "showRangeAsDefault"; "required": false; "isSignal": true; }; "nonNullable": { "alias": "nonNullable"; "required": false; "isSignal": true; }; }, { "valueCorrected": "valueCorrected"; }, never, never, true, never>;
}
