export declare const MIN_SEGMENT_INDEX = 0;
export declare const LARGE_STEP = 10;
export type KdsInputSegment = {
    start: number;
    end: number;
    template: readonly string[];
    /** Lowest valid integer for this segment (used by arrow stepping). */
    min: number;
    /** Highest valid integer for this segment (used by arrow stepping and typed-digit normalisation). */
    max: number;
};
export type KdsInputSegmentsConfig = {
    template: readonly string[];
    segments: readonly KdsInputSegment[];
    parsePastedText?: (text: string) => string | null;
};
export declare const isDigitChar: (char: string | undefined) => boolean;
/**
 * Returns true when the pointer click landed far past the end of the rendered
 * text (more than `TRAILING_CLICK_TOLERANCE_PX` pixels of empty space to the
 * right). In that case we treat the click as "clicked outside the text" so
 * the caller can skip the normal caret-based segment resolution and apply its
 * own fallback selection behavior.
 */
export declare const isClickPastText: (input: HTMLInputElement, event: MouseEvent) => boolean;
export declare const getSteppingDelta: (event: KeyboardEvent) => number | null;
export declare const getSegmentLength: (segment: KdsInputSegment) => number;
/**
 * If the buffer is full and its numeric value falls outside
 * `[segment.min, segment.max]`, replace it with the clamped boundary value.
 * Example: typing `15` for a month segment (max 12) clamps to `12`.
 */
export declare const clampSegmentBuffer: (segment: KdsInputSegment, buffer: string[]) => void;
/** Highest valid leading digit for a segment, derived from its `max`. */
export declare const getMaxFirstDigit: (segment: KdsInputSegment) => number;
/**
 * Returns the next integer value for a segment after applying `delta`, wrapping
 * around `[segment.min, segment.max]`. If `currentValue` is `undefined`
 * (segment is still at the template with no digits typed yet), a positive
 * delta returns `segment.min` and a negative delta returns `segment.max`.
 */
export declare const stepSegment: (segment: Pick<KdsInputSegment, "min" | "max">, currentValue: number | undefined, delta: number) => number;
/**
 * Resolve the segment that should be selected when the user clicks at the
 * given caret position.
 *
 * Rules (in order):
 * 1. If the caret is inside a segment, select that segment.
 * 2. If the caret is on a separator (or past the last segment), prefer the
 *    **previous** segment — the one the user just clicked past. This matches
 *    the common expectation that clicking right after a segment keeps focus
 *    on that segment (e.g. clicking between `MM` and `-DD` selects month).
 *
 * Callers that want to distinguish "just past the text" from "far past the
 * text" must do so before calling this function (based on the pointer's X
 * coordinate vs the rendered text width).
 */
export declare const resolveClickedSegment: (segments: readonly KdsInputSegment[], position: number) => number;
export declare const spansMultipleSegments: (segments: readonly KdsInputSegment[], start: number, end: number) => boolean;
export declare const getInputSegmentDigitIndices: (segments: readonly KdsInputSegment[]) => number[];
export declare const getInputSegmentsTemplateValue: (config: KdsInputSegmentsConfig) => string;
export declare const isInputSegmentsEmpty: (displayValue: string, config: KdsInputSegmentsConfig) => boolean;
export declare const isInputSegmentsComplete: (displayValue: string, config: KdsInputSegmentsConfig) => boolean;
//# sourceMappingURL=useInputSegments.helpers.d.ts.map