/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { TimeValue, TimeConstraints } from '../timepicker.types.js'; import { TimePickerHost, TimeValidationController } from '../interfaces/timepicker.interface.js'; /** * Controller for handling time validation logic */ export declare class TimePickerValidationController implements TimeValidationController { private host; private constraints; constructor(host: TimePickerHost); /** * Set validation constraints */ setConstraints(constraints: TimeConstraints): void; /** * Get current constraints */ getConstraints(): TimeConstraints; /** * Validate time against all constraints */ validateConstraints(time: TimeValue): boolean; /** * Check if time is within min/max bounds */ isTimeInBounds(time: TimeValue): boolean; /** * Check if time is explicitly disabled */ isTimeDisabled(time: TimeValue): boolean; /** * Check if time is in enabled times list (if specified) */ isTimeEnabled(time: TimeValue): boolean; /** * Get validation message for a time */ getValidationMessage(time: TimeValue): string; /** * Get bounds validation message */ private getBoundsValidationMessage; /** * Validate time format */ validateTimeFormat(timeString: string): boolean; /** * Get validation result with details */ getValidationResult(time: TimeValue): { isValid: boolean; message: string; errors: string[]; }; /** * Find nearest valid time */ findNearestValidTime(time: TimeValue): TimeValue | null; /** * Check if current time selection is valid */ isCurrentSelectionValid(): boolean; /** * Set min time constraint */ setMinTime(minTime: string | null): void; /** * Set max time constraint */ setMaxTime(maxTime: string | null): void; /** * Set disabled times */ setDisabledTimes(disabledTimes: string[]): void; /** * Set enabled times */ setEnabledTimes(enabledTimes: string[]): void; /** * Clear all constraints */ clearConstraints(): void; } //# sourceMappingURL=validation.controller.d.ts.map