import { Sizes } from '@m4l/styles';
import { Theme } from '@mui/material';
import { ClipboardEvent, FocusEvent, KeyboardEvent, MouseEvent, RefObject } from 'react';
import { M4LOverridesStyleRules } from '../../@types/augmentations';
import { SelectOption } from '../extended/mui/Select/types';
import { TextFieldProps, TextFieldVariants } from '../extended/mui/TextField/types';
import { TIME_PICKER_KEY_COMPONENT } from './constants';
import { TimePickerSlots } from './slots/TimePickerEnum';
export type TimePickerDisplayVariant = 'military' | 'ampm';
export type TimePickerDisplayVariantSource = TimePickerDisplayVariant | 'auto';
export type TimePickerGranularity = 'hours' | 'minutes' | 'seconds';
export type TimePickerRenderVariant = 'field' | 'inline';
export type TimePickerPeriod = 'AM' | 'PM';
export type TimePickerSegment = 'hours' | 'minutes' | 'seconds' | 'period';
export interface TimePickerValueParts {
    hours24: string;
    minutes: string;
    seconds: string;
}
export interface TimePickerDisplayParts {
    hours: string;
    minutes: string;
    seconds: string;
    period: TimePickerPeriod;
}
export interface TimePickerSegmentOptions {
    hours: SelectOption<string>[];
    minutes: SelectOption<string>[];
    seconds: SelectOption<string>[];
    period: SelectOption<TimePickerPeriod>[];
}
export interface TimePickerProps extends Omit<TextFieldProps, 'defaultValue' | 'onChange' | 'value'> {
    /**
     * Controlled value rendered by the input.
     */
    value?: string;
    /**
     * Initial value used in uncontrolled mode.
     */
    defaultValue?: string;
    /**
     * Called with the formatted value after a valid commit.
     */
    onChange?: (value: string) => void;
    /**
     * Controls how the value is displayed today while keeping room for a future provider.
     */
    displayVariant?: TimePickerDisplayVariantSource;
    /**
     * Controls the deepest visible segment in the input and popover.
     */
    granularity?: TimePickerGranularity;
    /**
     * Controls whether the picker renders as a masked field with a popover or as inline segment selects.
     */
    pickerVariant?: TimePickerRenderVariant;
    /**
     * Opens the field-variant popover as soon as the visible input receives focus. Defaults to true.
     */
    openOnFocus?: boolean;
    /**
     * Prevents direct edits and popover opening while keeping the current value visible.
     */
    readOnly?: boolean;
}
export interface UseTimePickerProps {
    value?: string;
    defaultValue?: string;
    onChange?: (value: string) => void;
    displayVariant: TimePickerDisplayVariantSource;
    granularity: TimePickerGranularity;
    disabled: boolean;
    inputElementRef: RefObject<HTMLInputElement | null>;
    readOnly: boolean;
}
export interface UseTimePickerResult {
    anchorEl: HTMLElement | null;
    defaultPlaceholder: string;
    displayParts: TimePickerDisplayParts;
    draftInputValue: string;
    draftSummary: string;
    open: boolean;
    resolvedDisplayVariant: TimePickerDisplayVariant;
    segmentOptions: TimePickerSegmentOptions;
    visibleSegments: TimePickerSegment[];
    commitDraftInputValue: () => void;
    handleCancel: () => void;
    handleClose: () => void;
    handleConfirm: () => void;
    handlePopoverEnterShortcut: () => void;
    commitDisplaySegmentChange: (segment: TimePickerSegment, value: string) => void;
    handleDisplaySegmentChange: (segment: TimePickerSegment, value: string) => void;
    handleInputFocus: (event: FocusEvent<HTMLElement>) => void;
    handleInputKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
    handleInputMouseUp: (event: MouseEvent<HTMLElement>) => void;
    handleInputPaste: (event: ClipboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
    handleInputValueChange: (nextValue: string) => void;
    handleOpen: (anchor: HTMLElement) => void;
}
export interface TimePickerOwnerState {
    [key: string]: unknown;
    disabled: boolean;
    error: boolean;
    open: boolean;
    popoverWidth?: number;
    size: Extract<Sizes, 'small' | 'medium'>;
    variant: TextFieldVariants;
}
export type TimePickerSlotsType = keyof typeof TimePickerSlots;
export type TimePickerStyles = M4LOverridesStyleRules<TimePickerSlotsType, typeof TIME_PICKER_KEY_COMPONENT, Theme>;
//# sourceMappingURL=types.d.ts.map