import { Renderable, Value } from '@tempots/dom';
import type { SchemaContext } from '../schema-context';
export type ChoiceMode = 'auto' | 'segmented' | 'select';
export interface ChoiceOption<T extends string | number> {
    value: T;
    label: string;
}
export interface ChoiceSelectorParams<T extends string | number> {
    options: ReadonlyArray<ChoiceOption<T>>;
    selected: Value<T>;
    onChange: (value: T) => void;
    mode?: ChoiceMode;
    size?: 'sm' | 'md' | 'lg';
    keyFor?: (value: T) => string;
    parseKey?: (key: string) => T;
}
/**
 * Build a selector UI that automatically chooses SegmentedInput (<=3 options)
 * or NativeSelect (>3 options), with optional explicit override.
 * Works with both string and number choices via keyFor/parseKey.
 */
export declare function ChoiceSelector<T extends string | number>(params: ChoiceSelectorParams<T>): Renderable;
export interface WithSelectorLayoutParams {
    ctx: SchemaContext;
    showSelector: boolean;
    selector: Renderable;
    inner: Renderable;
}
/**
 * Wrap inner control with selector and layout based on context.
 * - At root: show selector + inner in a vertical Stack when showSelector is true
 * - Non-root: wrap content in InputWrapper and include selector when needed
 */
export declare function WithSelectorLayout({ ctx, showSelector, selector, inner, }: WithSelectorLayoutParams): Renderable;
