import * as i0 from '@angular/core';
import { OnInit, AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, ChangeDetectorRef, SimpleChanges } from '@angular/core';
import { ControlValueAccessor, Validator } from '@angular/forms';
import { DatetimeAdapter, DateTimeFormats } from '@fundamental-ngx/core/datetime';
import { FormItemControl, PopoverFormMessageService } from '@fundamental-ngx/core/form';
import { Placement } from '@fundamental-ngx/core/shared';
import { TimeComponent } from '@fundamental-ngx/core/time';
import { FormStates } from '@fundamental-ngx/cdk/forms';
import { Nullable } from '@fundamental-ngx/cdk/utils';

declare class TimePickerComponent<D> implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges, OnDestroy, Validator, FormItemControl {
    private _changeDetectorRef;
    private _elementRef;
    private _dateTimeAdapter;
    private _dateTimeFormats;
    private _popoverFormMessage;
    /**
     * Date time object representation
     */
    time: Nullable<D>;
    /** Id attribute for input element inside TimePicker component */
    inputId: string;
    /** Disables the component. */
    disabled: boolean;
    /** If it is mandatory field */
    required: boolean;
    /** Whether to show spinner buttons */
    spinnerButtons: boolean;
    /**
     * When set to false, uses the 24 hour clock (hours ranging from 0 to 23).
     * Default value based on the current locale format option
     */
    meridian: boolean;
    /**
     * When set to false, hides the input for seconds.
     * Default value based on the current locale format option
     * */
    displaySeconds: boolean;
    /**
     * When set to false, hides the input for minutes.
     * Default value based on the current locale format option
     * */
    displayMinutes: boolean;
    /**
     * When set to false, hides the input for hours.
     * Default value based on the current locale format option
     * */
    displayHours: boolean;
    /**
     * Default time picker placeholder which is set dependant on the hours, minutes and seconds.
     * Otherwise It can be set to a default value
     */
    placeholder: string;
    /** Aria label for the time picker input. */
    timePickerInputLabel: string;
    /** Aria label for the time picker toggle button. */
    timePickerButtonLabel: string;
    /** Aria-labelledby for the time picker toggle button. */
    ariaLabelledBy: Nullable<string>;
    /** Whether a null input is considered valid(success). */
    allowNull: boolean;
    /** Defines if time component should be used with tablet mode */
    tablet: boolean;
    /** Text displayed in message */
    set message(message: string);
    /** Type of the message. Can be 'success' | 'error' | 'warning' | 'information' */
    set messageType(messageType: FormStates);
    /**
     * The trigger events that will open/close the message box.
     * Accepts any [HTML DOM Events](https://www.w3schools.com/jsref/dom_obj_event.asp).
     */
    set messageTriggers(triggers: string[]);
    /**
     *  The placement of the popover. It can be one of: top, top-start, top-end, bottom,
     *  bottom-start, bottom-end, right, right-start, right-end, left, left-start, left-end.
     */
    placement: Placement;
    /** Whether to validate the time picker input. */
    useValidation: boolean;
    /**
     *  The state of the form control - applies css classes.
     *  Also this is applied to message.
     *  Can be `success`, `error`, `warning`, `information` or blank for default.
     */
    set state(state: FormStates);
    get state(): FormStates;
    /**
     * Whether AddOn Button should be focusable
     * @default true
     */
    buttonFocusable: boolean;
    /**
     * When set to true, time inputs won't allow to have 1 digit
     * for example 9 will become 09
     * but 12 will be kept as 12.
     */
    keepTwoDigitsTime: boolean;
    /**
     * Display format option to customize time format in input control.
     * Must be a format option that is understandable by DatetimeAdapter.
     */
    displayFormat: unknown;
    /**
     * Parse format option to customize time format in input control.
     * Must be a format option that is understandable by DatetimeAdapter.
     */
    parseFormat: unknown;
    /**
     * Value state "success" aria message.
     */
    valueStateSuccessMessage: string;
    /**
     * Value state "information" aria message.
     */
    valueStateInformationMessage: string;
    /**
     * Value state "warning" aria message.
     */
    valueStateWarningMessage: string;
    /**
     * Value state "error" aria message.
     */
    valueStateErrorMessage: string;
    /** Event emitted when the state of the isOpen property changes. */
    isOpenChange: EventEmitter<boolean>;
    /** @hidden */
    child: TimeComponent<D>;
    /** @hidden */
    _inputGroupElement: ElementRef;
    /** @hidden */
    _inputElement: ElementRef;
    /** @hidden */
    private readonly _formMessageTemplate;
    /**
     * The interval between selectable minutes (e.g., 1 for every minute, 5 for 5-minute intervals, 15 for 15-minute intervals).
     * Defaults to 1 (every minute).
     */
    readonly minuteStep: i0.InputSignal<number>;
    /** @hidden */
    _message: string | null;
    /** @hidden */
    _messageType: FormStates | null;
    /** @hidden */
    _messageTriggers: string[];
    /**
     * @hidden
     * Whether the input time is valid(success). Internal use.
     */
    _isInvalidTimeInput: boolean;
    /**
     * @hidden
     * Indicates when popover is opened
     */
    isOpen: boolean;
    /** @hidden */
    _meridian: boolean;
    /** @hidden */
    _displaySeconds: boolean;
    /** @hidden */
    _displayMinutes: boolean;
    /** @hidden */
    _displayHours: boolean;
    /**
     * @hidden
     * Input field value
     */
    _inputTimeValue: string;
    /** @hidden */
    _formValueStateMessageId: string;
    /** @hidden */
    private _state;
    /** @hidden */
    private readonly _destroyRef;
    /** @hidden */
    private _subscriptions;
    /** @hidden */
    get _placeholder(): string;
    /** @hidden */
    constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, _dateTimeAdapter: DatetimeAdapter<D>, _dateTimeFormats: DateTimeFormats, _popoverFormMessage: PopoverFormMessageService);
    /** @hidden */
    onChange: (_: Nullable<D>) => void;
    /** @hidden */
    onTouched: () => void;
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngOnChanges(changes: SimpleChanges): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /**
     * @hidden
     * Function that implements Validator Interface, adds validation support for forms
     */
    validate(): {
        [key: string]: any;
    } | null;
    /**
     * Returns the current value of the time input.
     */
    getTime(): Nullable<D>;
    /**
     * Returns format options to be used during time formatting.
     */
    getDisplayFormat(): unknown;
    /**
     * Returns format options to be used during time parsing.
     */
    getParseFormat(): unknown;
    /** @hidden */
    _getFormattedTime(time?: Nullable<D>): string;
    /**
     *  @hidden
     *  When the open state is changed, there should be at least one active item, which by default is hour.
     */
    _setIsOpen(isOpen: boolean): void;
    /**
     * @hidden
     * Time input field changes handler
     */
    _timeInputChanged(inputValue: string): void;
    /** @hidden */
    _inputGroupClicked($event: MouseEvent): void;
    /** @hidden */
    _addOnButtonClicked(): void;
    /** @hidden */
    _popoverClosed(): void;
    /** @hidden */
    _getPlaceholder(): string;
    /** @hidden */
    _timeComponentValueChanged(time: D): void;
    /** @hidden */
    registerOnChange(fn: (time: Nullable<D>) => void): void;
    /** @hidden */
    registerOnTouched(fn: any): void;
    /** @hidden */
    setDisabledState(isDisabled: boolean): void;
    /** @hidden */
    writeValue(time: D): void;
    /** @hidden */
    _formatTimeInputField(time?: Nullable<D>): string;
    /** @hidden */
    _changeMessageVisibility(): void;
    /** @hidden */
    _onOpenStateChanged(isOpen: boolean): void;
    /** @hidden */
    protected _focusOut(event: FocusEvent): void;
    /** @hidden */
    private _calculateTimeOptions;
    /** @hidden */
    private initialiseVariablesInMessageService;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerComponent<any>, [null, null, { optional: true; }, { optional: true; }, null]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent<any>, "fd-time-picker", never, { "time": { "alias": "time"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "spinnerButtons": { "alias": "spinnerButtons"; "required": false; }; "meridian": { "alias": "meridian"; "required": false; }; "displaySeconds": { "alias": "displaySeconds"; "required": false; }; "displayMinutes": { "alias": "displayMinutes"; "required": false; }; "displayHours": { "alias": "displayHours"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "timePickerInputLabel": { "alias": "timePickerInputLabel"; "required": false; }; "timePickerButtonLabel": { "alias": "timePickerButtonLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "allowNull": { "alias": "allowNull"; "required": false; }; "tablet": { "alias": "tablet"; "required": false; }; "message": { "alias": "message"; "required": false; }; "messageType": { "alias": "messageType"; "required": false; }; "messageTriggers": { "alias": "messageTriggers"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "useValidation": { "alias": "useValidation"; "required": false; }; "state": { "alias": "state"; "required": false; }; "buttonFocusable": { "alias": "buttonFocusable"; "required": false; }; "keepTwoDigitsTime": { "alias": "keepTwoDigitsTime"; "required": false; }; "displayFormat": { "alias": "displayFormat"; "required": false; }; "parseFormat": { "alias": "parseFormat"; "required": false; }; "valueStateSuccessMessage": { "alias": "valueStateSuccessMessage"; "required": false; }; "valueStateInformationMessage": { "alias": "valueStateInformationMessage"; "required": false; }; "valueStateWarningMessage": { "alias": "valueStateWarningMessage"; "required": false; }; "valueStateErrorMessage": { "alias": "valueStateErrorMessage"; "required": false; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; }, { "isOpenChange": "isOpenChange"; }, never, ["*"], true, never>;
}

/**
 * @deprecated
 * Use direct import of `TimePickerComponent`
 */
declare class TimePickerModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<TimePickerModule, never, [typeof TimePickerComponent], [typeof TimePickerComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<TimePickerModule>;
}

export { TimePickerComponent, TimePickerModule };
