import { FormControl } from '@angular/forms'; import { Color } from '@ionic/core'; import { ComponentState } from '../../types'; /** * Date range value. */ export interface DateRangeValue { /** Start date (ISO string) */ start: string | null; /** End date (ISO string) */ end: string | null; } /** * Metadata for the date range input component. */ export interface DateRangeInputMetadata { /** Form control for the date range (stores DateRangeValue) */ control: FormControl; /** Separate control for start date */ startControl?: FormControl; /** Separate control for end date */ endControl?: FormControl; /** Unique token for the input */ token?: string; /** Display label */ label?: string; /** Field name */ name?: string; /** Help text */ hint?: string; /** Field state */ state?: ComponentState; /** Minimum selectable date (ISO string) */ min?: string; /** Maximum selectable date (ISO string) */ max?: string; /** Locale for date display */ locale?: string; /** First day of week (0 = Sunday, 1 = Monday) */ firstDayOfWeek?: number; /** Date presentation format */ presentation?: 'date' | 'date-time' | 'month' | 'month-year' | 'year'; /** Custom format options */ formatOptions?: { date?: { dateStyle?: 'full' | 'long' | 'medium' | 'short'; }; time?: { timeStyle?: 'full' | 'long' | 'medium' | 'short'; }; }; /** Start date label */ startLabel?: string; /** End date label */ endLabel?: string; /** Start date placeholder */ startPlaceholder?: string; /** End date placeholder */ endPlaceholder?: string; /** Done button text */ doneText?: string; /** Cancel button text */ cancelText?: string; /** Require both dates */ requireBoth?: boolean; /** Minimum range in days */ minRangeDays?: number; /** Maximum range in days */ maxRangeDays?: number; /** Disable past dates */ disablePastDates?: boolean; /** Disable future dates */ disableFutureDates?: boolean; /** Specific dates to disable */ disabledDates?: string[]; /** Display mode: 'inline' shows both pickers, 'modal' uses modals */ displayMode?: 'inline' | 'modal'; /** Layout direction */ layout?: 'horizontal' | 'vertical'; /** Component color */ color?: Color; /** Custom CSS class */ cssClass?: string; /** Content key for reactive label */ labelContentKey?: string; /** Content key for reactive start label */ startLabelContentKey?: string; /** Content key for reactive end label */ endLabelContentKey?: string; /** Content key for reactive hint */ hintContentKey?: string; /** Component class name for content lookup */ contentClass?: string; /** Custom error messages */ errors?: Record; /** Show validation errors */ showErrors?: boolean; } /** * Event emitted when date range changes. */ export interface DateRangeChangeEvent { /** Date range value */ value: DateRangeValue; /** Whether the range is valid */ isValid: boolean; /** Number of days in the range */ dayCount: number | null; }