/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { TimeValue, TimeFormat, TimePeriod } from '../timepicker.types.js'; import { TimePickerHost, TimeFormattingController } from '../interfaces/timepicker.interface.js'; /** * Controller for handling time formatting logic */ export declare class TimePickerFormattingController implements TimeFormattingController { private host; constructor(host: TimePickerHost); /** * Format time for display (user-facing format) */ formatForDisplay(time: TimeValue): string; /** * Format time for input field value */ formatForInput(time: TimeValue): string; /** * Parse input value to TimeValue */ parseInputValue(value: string): TimeValue | null; /** * Get time format pattern for the current configuration */ getFormatPattern(): string; /** * Get placeholder text for input field */ getPlaceholder(): string; /** * Format time component with leading zeros */ formatTimeComponent(value: number, length?: number): string; /** * Format hours based on current format */ formatHours(hours: number): string; /** * Format minutes with leading zero */ formatMinutes(minutes: number): string; /** * Format seconds with leading zero */ formatSeconds(seconds: number): string; /** * Get period (AM/PM) for 12-hour format */ getPeriod(hours: number): TimePeriod; /** * Format time parts separately */ formatTimeParts(time: TimeValue): { hours: string; minutes: string; seconds: string; period?: TimePeriod; }; /** * Parse time parts from string */ parseTimeParts(timeString: string): { hours?: number; minutes?: number; seconds?: number; period?: TimePeriod; } | null; /** * Get time separator character */ getTimeSeparator(): string; /** * Check if format is valid */ isValidFormat(_format: string): boolean; /** * Get format examples */ getFormatExamples(): string[]; /** * Convert between formats */ convertFormat(timeString: string, fromFormat: TimeFormat, toFormat: TimeFormat): string | null; /** * Get human-readable time description */ getTimeDescription(time: TimeValue): string; } //# sourceMappingURL=formatting.controller.d.ts.map