/**
 * @license
 * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
 * The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 * @ignore
 */
import type { RefObject, ComponentProps } from 'preact';
import { AriaAttributesSignalExcluded, HTMLAttributesSignalExcluded } from "../utils/UNSAFE_attributeUtils";
import { TimeSegmentState } from './useTimeField';
import { InputTimeMask } from './InputTimeMask';
import type { TimePlaceholders, EditableTimeSegmentType } from './types';
import { TestIdProps } from "../hooks/UNSAFE_useTestId";
type InputTimeMaskProps = ComponentProps<typeof InputTimeMask>;
type AriaProps = Pick<AriaAttributesSignalExcluded, 'aria-describedby' | 'aria-invalid' | 'aria-label' | 'aria-labelledby'>;
type HTMLElementProps = Pick<HTMLAttributesSignalExcluded<HTMLElement>, 'onBlur' | 'onFocus'>;
export type Props = AriaProps & TestIdProps & HTMLElementProps & {
    /**
     * A base id prefix.
     */
    baseId: string;
    /**
     * A ref to the element that receives focus when the field's label is clicked,
     * or when the component is toggled between readonly and enabled. This is the
     * first segment in the field.
     */
    fieldRef?: RefObject<HTMLDivElement>;
    /**
     * Specifies the smallest time unit that is displayed by the component.
     * If set to minute, only hour and minute are shown.
     * If set to second then hour, minute, and second are shown.
     * If set to millisecond then hour, minute, second and millisecond are shown.
     */
    granularity?: InputTimeMaskProps['granularity'];
    /**
     * Whether to show a leading zero in the hour field when there is only one digit or not.
     */
    hasLeadingZeroForHour: boolean;
    /**
     * True if the component has an inside label.
     */
    hasInsideLabel?: boolean;
    /**
     * Specifies for accessibility purposes whether a value is required.
     */
    isRequired?: InputTimeMaskProps['isRequired'];
    /**
     * The placeholder masks used by the time field.
     */
    masks: TimePlaceholders;
    /**
     * Specifies how to align text within the field.
     */
    textAlign?: InputTimeMaskProps['textAlign'];
    /**
     * The current value of the component. The value's hour is a 0-23 hour.
     */
    value?: InputTimeMaskProps['value'];
    /**
     * The style variant of the component.
     */
    variant?: InputTimeMaskProps['variant'];
    /**
     * Callback invoked each time the user changes the value of a segment.
     *
     * For example, if the user
     * types '12' into the minute segment of an empty time field,
     * this callback will be called twice to change the minute
     * first to 1 and then 12.
     *
     * If the user types '1' into the hour segment of an empty time field,
     * this callback will be called once with the hour set to 1.
     * If the user then types '2', the callback will be called again. What it gets called with
     * depends on if the InputTimeMask is displaying a 1-12 hour time with a day period or a 0-23 hour time.
     * This is because the InputTimeMask's value's hour is stored as a 0-23 hour.
     *
     * If the user types in '12', and the time has a day period, the value's hour is 0, since 12 AM is converted to hour 0.
     * If the user types in '12', and the time does not have a day period, the value's hour is 12.
     *
     * If the user types in an hour that completes the segment, the other segments that are empty
     * are automatically filled with 0s, and the callback's value will reflect that, e.g.,
     * {hour: 0, minute: 0}.
     */
    onInput: InputTimeMaskProps['onInput'];
    /**
     * Callback invoked when the user commits the entered value by blurring or hitting the enter key.
     * The value's hour is a 0-23 hour.
     *
     * If the InputTimeMask's hour field is showing a 1-12 hour time, the
     * field's display value will be converted to a 0-23 hour, using the dayPeriod segment's value, which defaults to 'AM'.
     */
    onCommit: InputTimeMaskProps['onCommit'];
};
declare const findSegment: (segments: TimeSegmentState[], type: EditableTimeSegmentType) => TimeSegmentState;
/**
 * Container for Segment children that represent different parts of a time with no date.
 */
declare const TimeField: ({ "aria-describedby": describedBy, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, baseId, fieldRef, granularity, hasLeadingZeroForHour, hasInsideLabel, isRequired, masks: timeMasks, onBlur, onCommit, onFocus, onInput, testId, textAlign, value, variant }: Props) => import("preact").JSX.Element;
export { TimeField, findSegment };
