import { ControlValueAccessor, FormControl, FormGroup } from '@angular/forms';
import { OverlayComponent } from '@sixbell-telco/sdk/components/overlay';
import { DateRange, QuickRangePreset } from '@sixbell-telco/sdk/utils/date';
import 'cally';
import { DatePickerValue, OptionalTimeString } from '../types/date-picker.types';
import * as i0 from "@angular/core";
/**
* Datepicker - Single date and date range picker with optional time selection
*
* @remarks
* This component wraps Cally.js calendar elements and provides a rich, accessible
* date and date-range picking experience for Angular apps. It supports:
* - Single or range modes
* - Quick action ranges
* - Optional time selection with minutes or seconds
* - 12h/24h time display for the trigger text
* - Locale-aware calendar (auto-mapped from the TranslationService or overridden)
* - Form integration (reactive forms) and standalone usage
*
* The component is exported as `stDatepicker` for template reference variables
* to access methods (e.g. displayValue()).
*
* @example Basic single date
* ```html
*
* {{ picker.displayValue() || 'Pick a date' }}
*
* ```
*
* @example Date range with time (minutes)
* ```html
*
* {{ picker.displayValue() || 'Pick range' }}
*
* ```
*
* @example Reactive form control (range)
* ```html
*
* ```
*/
export declare class DatepickerComponent implements ControlValueAccessor {
/** Internal state for single date (ISO format) */
private readonly _selectedDateValue;
/** Internal state for date range (ISO format) */
private readonly _selectedRangeValue;
/** Disabled state */
private readonly _disabled;
/** Flag to prevent concurrent range updates */
private isUpdatingRange;
/** Translation service for reactive language changes */
private readonly translationService;
private readonly formattingService;
/** Form change callback */
private onControlChange;
/** Form touch callback */
private onControlTouch;
/** Overlay reference for controlling calendar popup */
datePickerOverlay: import("@angular/core").Signal;
/** Label displayed above the fieldset legend */
label: import("@angular/core").InputSignal;
/**
* Whether to show optional indicator
* @defaultValue false
*/
showOptional: import("@angular/core").InputSignal;
/**
* Optional indicator text (translation key or literal)
* @defaultValue 'sdk.formFields.optional'
*/
optionalText: import("@angular/core").InputSignal;
/**
* Picker mode
* @defaultValue 'single'
* @remarks 'single' for single date, 'range' for start/end selection
*/
mode: import("@angular/core").InputSignal<"single" | "range">;
/**
* Display/parse format for dates
* @defaultValue 'DD/MM/YYYY'
* @remarks Used for trigger text and for parsing external values (when provided as display strings)
*/
format: import("@angular/core").InputSignal<"DD/MM/YYYY" | "MM/DD/YYYY" | "YYYY-MM-DD" | "DD-MM-YYYY" | "MM-DD-YYYY" | "YYYY/MM/DD" | "DD.MM.YYYY" | "MM.DD.YYYY" | "YYYY.MM.DD">;
/**
* Locale used by the calendar web component
* @defaultValue 'en-US'
* @remarks If omitted or set to 'en-US', the component will auto-map from the TranslationService using `languageMapping`.
*/
language: import("@angular/core").InputSignal<"en-US" | "en-GB" | "es-ES" | "es-MX" | "fr-FR" | "de-DE" | "it-IT" | "pt-BR" | "pt-PT" | "ja-JP" | "ko-KR" | "zh-CN" | "zh-TW" | "ru-RU" | "ar-SA" | "hi-IN" | "nl-NL" | "sv-SE" | "da-DK" | "no-NO" | "fi-FI" | "pl-PL" | "tr-TR" | "he-IL" | "th-TH" | "vi-VN">;
/** Optional minimum selectable date (display or ISO). Internally coerced to ISO. */
minDate: import("@angular/core").InputSignal;
/** Optional maximum selectable date (display or ISO). Internally coerced to ISO. */
maxDate: import("@angular/core").InputSignal;
/** Single date value (external binding). Accepts display or ISO; stored internally as ISO. */
value: import("@angular/core").InputSignal;
/** Date range value (external binding). Accepts display or ISO; stored internally as ISO. */
rangeValue: import("@angular/core").InputSignal;
/** Name attribute for associated input (useful when wrapping with st-input). */
name: import("@angular/core").InputSignal;
/**
* Number of calendars to show in range mode
* @defaultValue 2
*/
rangeCalendars: import("@angular/core").InputSignal<2 | 1>;
/**
* Whether to show quick action buttons for common ranges
* @defaultValue true
*/
showQuickActions: import("@angular/core").InputSignal;
/**
* Whether to show time pickers for start/end
* @defaultValue false
*/
showTimePicker: import("@angular/core").InputSignal;
/**
* Whether to include seconds in time inputs and display
* @defaultValue false
*/
showSeconds: import("@angular/core").InputSignal;
/**
* Time display format for trigger text
* @defaultValue '24h'
* @remarks Affects only the textual display in the trigger, not the underlying stored time format
*/
timeDisplayFormat: import("@angular/core").InputSignal<"24h" | "12h">;
/**
* Mapping of translation language codes (e.g. 'en','es','pt') to calendar locales (e.g. 'en-US','es-MX','pt-BR')
* @defaultValue { en: 'en-US', es: 'es-MX', pt: 'pt-BR' }
*/
languageMapping: import("@angular/core").InputSignal>;
/**
* Use locale-based formatting for the trigger display instead of the custom pattern
* @defaultValue false
*/
useLocaleDisplay: import("@angular/core").InputSignal;
/**
* Locale date style when useLocaleDisplay=true
* @defaultValue 'short'
*/
dateStyle: import("@angular/core").InputSignal<"short" | "medium" | "long" | "full">;
/** Optional external defaults for start/end time (HH:mm or HH:mm:ss). When empty string, inputs render blank. */
startTimeValue: import("@angular/core").InputSignal;
endTimeValue: import("@angular/core").InputSignal;
/**
* Current start time value (internal signal). Empty when unset.
* @internal
*/
readonly startTime: import("@angular/core").WritableSignal;
/**
* Current end time value (internal signal). Empty when unset.
* @internal
*/
readonly endTime: import("@angular/core").WritableSignal;
/** Parent reactive form group (optional) */
parentForm: import("@angular/core").InputSignal | null>;
/** Name of the form control inside the parent form (optional) */
formControlName: import("@angular/core").InputSignal;
/**
* Emits formatted single date when it changes
* @remarks Uses the `format` (or locale display if enabled). For range mode, use `rangeUpdated`.
*/
dateUpdated: import("@angular/core").OutputEmitterRef;
/**
* Emits an ISO `DateRange` when both start & end are selected
* @remarks Start/end are always emitted in ISO (YYYY-MM-DD). Time values are emitted separately.
*/
rangeUpdated: import("@angular/core").OutputEmitterRef;
/** Emits formatted date when value changes (single mode). Alias of `dateUpdated`. */
valueChanged: import("@angular/core").OutputEmitterRef;
/** Emits ISO date range (alias of `rangeUpdated`). */
rangeValueChanged: import("@angular/core").OutputEmitterRef;
/** Emits start time (HH:mm or HH:mm:ss) changes; empty string when cleared */
startTimeChanged: import("@angular/core").OutputEmitterRef;
/** Emits end time (HH:mm or HH:mm:ss) changes; empty string when cleared */
endTimeChanged: import("@angular/core").OutputEmitterRef;
/** Effective minimum date (input or default 10 years ago) */
effectiveMinDate: import("@angular/core").Signal;
/** Effective maximum date (input or default 10 years ahead) */
effectiveMaxDate: import("@angular/core").Signal;
/** Locale for calendar components */
calendarLocale: import("@angular/core").Signal<"en-US" | "en-GB" | "es-ES" | "es-MX" | "fr-FR" | "de-DE" | "it-IT" | "pt-BR" | "pt-PT" | "ja-JP" | "ko-KR" | "zh-CN" | "zh-TW" | "ru-RU" | "ar-SA" | "hi-IN" | "nl-NL" | "sv-SE" | "da-DK" | "no-NO" | "fi-FI" | "pl-PL" | "tr-TR" | "he-IL" | "th-TH" | "vi-VN">;
/** Form control instance from parent form group */
formField: import("@angular/core").Signal | null>;
/** Formatted display value for single date */
selectedDate: import("@angular/core").Signal;
/** Formatted display value for date range */
selectedRange: import("@angular/core").Signal<{
start: string;
end: string;
} | null>;
/** @internal Value for calendar-range component (ISO/ISO format) */
rangeCalendarValue: import("@angular/core").Signal;
displayValue: import("@angular/core").Signal;
/** Time values normalized for the inputs based on showSeconds */
startTimeDisplay: import("@angular/core").Signal;
endTimeDisplay: import("@angular/core").Signal;
/** Keep internal state in sync when rangeValue input changes */
syncInputEff: import("@angular/core").EffectRef;
/** Keep internal state in sync when single value input changes */
syncSingleInputEff: import("@angular/core").EffectRef;
/** Sync external start/end time inputs into internal signals */
syncTimeInputsEff: import("@angular/core").EffectRef;
/** Exposed selected date value (ISO format) for template access */
selectedDateValue: import("@angular/core").Signal;
private formatMonthYear;
private formatWeekday;
private formatDateLocale;
fromDay: import("@angular/core").Signal;
fromMonthYear: import("@angular/core").Signal;
fromWeekday: import("@angular/core").Signal;
toDay: import("@angular/core").Signal;
toMonthYear: import("@angular/core").Signal;
toWeekday: import("@angular/core").Signal;
constructor();
/**
* Initialize component values based on inputs
*/
private initializeValues;
/**
* Set single date value programmatically
*/
private setSingleDateValue;
/**
* Emit change events and notify form controls
*/
private emitChanges;
/**
* Close overlay if available
*/
private closeOverlay;
/**
* Handle calendar change events from Cally components
* @internal
*/
onCalendarChange(calendarElement: HTMLElement, event?: Event): void;
/**
* Apply a predefined quick range preset
* @param preset One of: 'last7Days' | 'last30Days' | 'last6Months' | 'lastYear'
* @remarks This updates the date range (ISO). Time inputs are not modified.
*/
selectQuickRange(preset: QuickRangePreset): Promise;
/**
* Apply a time-based quick range (last N hours). Visible only when time picker is enabled.
* @param hours Number of hours to go back from now
* @remarks Updates the date range and emits start/end time strings (HH:mm:ss)
*/
selectQuickLastHours(hours: number): Promise;
/**
* Clear the current range selection
* @remarks Also clears start/end time inputs and emits empty strings for time changes.
*/
clearRange(): Promise;
/**
* Clear the current single date selection
*/
clearDate(): void;
/**
* Set range value programmatically
*/
private setRangeValue;
/**
* Update calendar element to ensure Cally.js synchronization
*/
private updateCalendarElementValue;
/**
* Handle single date calendar change
*/
private handleSingleCalendarChange;
/**
* Handle range calendar change
*/
private handleRangeCalendarChange;
/**
* Finalize range selection: ensure same-day times if needed and emit when selection is complete
*/
private finalizeRangeSelection;
/**
* Extract date value from calendar element
*/
private extractDateValue;
/**
* Extract range value from calendar element
*/
private extractRangeValue;
/**
* Write external model value into the component
*/
writeValue(obj: DatePickerValue): void;
/**
* Register form change callback
*/
registerOnChange(fn: (value: DatePickerValue) => void): void;
/**
* Register form touched callback
*/
registerOnTouched(fn: () => void): void;
/**
* Update disabled state from Angular forms
*/
setDisabledState(isDisabled: boolean): void;
/** Icons for navigation buttons */
readonly iconChevronLeft = "";
readonly iconChevronRight = "";
readonly iconClock = "";
private clampTime;
onStartTimeChange(ev: Event): void;
onEndTimeChange(ev: Event): void;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
}