/** * Creates a dropdown element with a specific className. * @param className - The class to add to the dropdown element. * @returns The created dropdown element. */ export declare const createDropdownElement: (className: string) => HTMLDivElement; /** * Filters the dropdown options based on the query string. * @param dropdown - The dropdown element to populate. * @param query - The query string to filter options by. * @param options - Array of string options to display in the dropdown. */ export declare const filterDropdownOptions: (dropdown: HTMLDivElement, query: string, options: string[], handleTimeOptionClick: (option: string) => void, closeDropdown?: () => void) => void; /** * Positions the dropdown relative to the input field. * @param dropdown - The dropdown element to position. * @param inputElement - The input element to base the dropdown positioning on. * @param wrapperElement - The wrapper element to base the dropdown positioning on. This will take precedence over the input element. * @param dropdownPosition - The position of the dropdown. 'fixed' or 'absolute'. */ export declare const positionDropdownRelativeToInput: (dropdown: HTMLDivElement, inputElement: HTMLInputElement, wrapperElement?: HTMLElement, dropdownPosition?: "fixed" | "absolute") => void; /** * Formats a Date object into a time string (HH:MM AM/PM). * @param date - The Date object to format. * @returns The formatted time string (e.g., "12:00 PM"). */ export declare const formatTime: (date: Date) => string; /** * Toggles the visibility of a dropdown element. * @param dropdown - The dropdown element to show or hide. * @param isVisible - A boolean indicating whether the dropdown should be visible. */ export declare const toggleDropdownVisibility: (dropdown: HTMLDivElement, isVisible: boolean) => void; export declare const generateTimeOptions: (minuteStep: number) => string[]; /** * Parses a time input string and returns a formatted time string. * Handles various input formats and edge cases including AM/PM specifications. * Hours greater than 24 are handled by taking remainder of 24. * * @param input - The time input string to parse (can be numeric, time string, or include AM/PM) * @returns A formatted time string in "HH:MM AM/PM" format * * @example * parseTimeInput("1") => "1:00 AM" * parseTimeInput("abc") => "12:00 AM" * parseTimeInput("3456") => "12:00 AM" * parseTimeInput("1:30") => "1:30 AM" * parseTimeInput("1:30 PM") => "1:30 PM" * parseTimeInput("13:45") => "1:45 PM" */ export declare const parseTimeInput: (input: string) => string;