/**
 * UI Utilities
 *
 * Shared UI functionality for CounterMeasure applications.
 * Includes theme management, auto-dismiss, and form helpers.
 */
export type Theme = 'light' | 'dark' | 'monokai' | 'glass' | 'system';
export type ResolvedTheme = 'light' | 'dark' | 'monokai' | 'glass';
export interface ThemeConfig {
    storageKey?: string;
    defaultTheme?: Theme;
    themes?: Theme[];
    attribute?: string;
}
/**
 * Configure theme settings.
 */
export declare function configureTheme(config: ThemeConfig): void;
/**
 * Check if a value is a valid theme.
 */
export declare function isValidTheme(value: string | null | undefined): value is Theme;
/**
 * Get human-readable theme label.
 */
export declare function getThemeLabel(theme: Theme): string;
/**
 * Get the user's preferred theme from localStorage or default.
 */
export declare function getPreferredTheme(): Theme;
/**
 * Get the resolved theme (light, dark, or monokai) based on preference.
 */
export declare function getResolvedTheme(preference?: Theme): ResolvedTheme;
/**
 * Get the current theme from the document.
 */
export declare function getCurrentTheme(): Theme;
/**
 * Apply theme to the document.
 */
export declare function applyTheme(theme?: Theme): void;
/**
 * Save the theme preference to localStorage.
 */
export declare function saveTheme(theme: Theme): void;
/**
 * Set and persist theme preference.
 */
export declare function setTheme(theme: Theme): void;
/**
 * Get the next theme in the toggle cycle.
 */
export declare function getNextTheme(current: Theme): Theme;
/**
 * Toggle to the next theme in the cycle.
 */
export declare function toggleTheme(): Theme;
/**
 * Update the theme toggle cycle without changing the rest of the theme config.
 */
export declare function updateToggleCycle(themes: ResolvedTheme[]): void;
/**
 * Setup theme toggle button.
 */
export declare function setupThemeToggle(buttonSelector?: string): void;
/**
 * Setup theme option buttons.
 */
export declare function setupThemeOptions(): void;
/**
 * Watch for system theme changes and update accordingly.
 */
export declare function watchSystemTheme(callback?: (theme: ResolvedTheme) => void): () => void;
/**
 * Initialize theme on page load.
 */
export declare function initTheme(config?: ThemeConfig): void;
/**
 * Setup auto-dismiss for elements with data-auto-dismiss attribute.
 */
export declare function setupAutoDismiss(defaultDuration?: number): void;
export interface FormFieldError {
    field: string;
    message: string;
}
/**
 * Display form validation errors.
 */
export declare function displayFormErrors(formSelector: string, errors: FormFieldError[]): void;
/**
 * Clear all form errors.
 */
export declare function clearFormErrors(formSelector: string): void;
/**
 * Submit form with fetch and handle response.
 */
export declare function submitForm(formSelector: string, options?: {
    method?: string;
    headers?: Record<string, string>;
    transform?: (data: FormData) => unknown;
}): Promise<{
    ok: boolean;
    data?: unknown;
    errors?: FormFieldError[];
}>;
/**
 * Show loading state on a button.
 */
export declare function setButtonLoading(button: HTMLButtonElement, loading: boolean): void;
//# sourceMappingURL=index.d.ts.map