export type GraphControlsMode = "all" | "slidersonly" | "inputsonly" | "none";
export type PointControlsMode = "both" | "xonly" | "yonly" | "none";
export type CircleControlsMode = "center" | "radius" | "centerandradius" | "none";
export type RegularPolygonControlsMode = "center" | "radius" | "centerandradius" | "none";
export type PolygonControlsMode = "center" | "none";
export type TriangleControlsMode = "center" | "none";
export type RectangleControlsMode = "center" | "widthandheight" | "centerwidthandheight" | "none";
export type LineSegmentControlsMode = "endpoints" | "none";
export type VectorControlsMode = "displacement" | "headandtail" | "headonly" | "tailonly" | "none";
export type GraphControlAxis = "x" | "y";
export type PointMoveRole = "point" | "center" | "rectangle" | "polygon" | "triangle" | "regularPolygon" | "endpoint1" | "endpoint2" | "displacement" | "head" | "tail";
export type UnifiedPointMovePayload = {
    componentIdx: number;
    pointRole: PointMoveRole;
    x: number;
    y: number;
    transient: boolean;
    skippable: boolean;
    sourceDetails?: Record<string, any>;
    actionId?: string;
};
export type PointLikeInputSuffix = GraphControlAxis | "pair";
export type ScalarControlRole = string;
export type GraphControlDisplaySettings = {
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlPoint = {
    controlType: "point";
    componentIdx: number;
    pointNumber: number;
    controlOrder: number;
    x: number;
    y: number;
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlCircle = {
    controlType: "circle";
    componentIdx: number;
    circleNumber: number;
    controlOrder: number;
    center: {
        x: number;
        y: number;
    };
    radius: number;
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlRegularPolygon = {
    controlType: "regularPolygon";
    componentIdx: number;
    regularPolygonNumber: number;
    controlOrder: number;
    center: {
        x: number;
        y: number;
    };
    radius: number;
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlPolygon = {
    controlType: "polygon";
    componentIdx: number;
    polygonNumber: number;
    controlOrder: number;
    center: {
        x: number;
        y: number;
    };
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlTriangle = {
    controlType: "triangle";
    componentIdx: number;
    triangleNumber: number;
    controlOrder: number;
    center: {
        x: number;
        y: number;
    };
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlRectangle = {
    controlType: "rectangle";
    componentIdx: number;
    rectangleNumber: number;
    controlOrder: number;
    center: {
        x: number;
        y: number;
    };
    width: number;
    height: number;
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlLineSegment = {
    controlType: "lineSegment";
    componentIdx: number;
    lineSegmentNumber: number;
    controlOrder: number;
    endpoint1: {
        x: number;
        y: number;
    };
    endpoint2: {
        x: number;
        y: number;
    };
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlVector = {
    controlType: "vector";
    componentIdx: number;
    vectorNumber: number;
    controlOrder: number;
    head: {
        x: number;
        y: number;
    };
    tail: {
        x: number;
        y: number;
    };
    displacement: {
        x: number;
        y: number;
    };
    addControls: string;
    label: string;
    labelHasLatex: boolean;
    displayDigits: number;
    displayDecimals: number;
    displaySmallAsZero: number;
    padZeros: boolean;
    avoidScientificNotation: boolean;
};
export type GraphControlItem = GraphControlPoint | GraphControlCircle | GraphControlRegularPolygon | GraphControlPolygon | GraphControlTriangle | GraphControlRectangle | GraphControlLineSegment | GraphControlVector;
export declare const DEFAULT_INITIAL_EXPANDED_GRAPH_CONTROL_COUNT = 2;
export declare const GRAPH_CONTROL_TYPES: readonly ["point", "circle", "regularPolygon", "polygon", "triangle", "rectangle", "lineSegment", "vector"];
export type GraphControlsFamilySVs = {
    addControls: string;
    xMin: number;
    xMax: number;
    yMin: number;
    yMax: number;
    graphicalDescendantsForControls: GraphControlItem[];
};
export type GraphControlsRootProps = {
    id: string;
    SVs: GraphControlsFamilySVs;
    callAction: (argObj: Record<string, any>) => Promise<any> | void;
};
export type GraphControlsFamilyProps = GraphControlsRootProps & {
    isGraphControlExpanded: (componentIdx: number) => boolean;
    toggleGraphControlExpanded: (componentIdx: number) => void;
};
/**
 * Determine which controls should be initially expanded on first load.
 * Returns a Set of componentIdx values for the first `count` controls in the ordered list.
 * This keeps the control list compact for long graphs while allowing users to access
 * the most relevant controls without scrolling. Subsequent user toggles are tracked separately.
 *
 * @param orderedControls - Controls sorted for display
 * @param count - Number of controls to expand initially (default: 2)
 * @returns Set of componentIdx values that should be expanded by default
 */
export declare function selectInitialExpandedGraphControlIds(orderedControls: GraphControlItem[], count?: number): Set<number>;
/**
 * Select controls of a single discriminator from the unified controls list.
 */
export declare function selectGraphControlsByType<TControlType extends GraphControlItem["controlType"]>(controls: GraphControlItem[], controlType: TControlType): Extract<GraphControlItem, {
    controlType: TControlType;
}>[];
/**
 * Runtime guard for control payloads arriving from the worker.
 *
 * TypeScript already enforces known discriminators at compile time, but this
 * guard ensures malformed runtime payloads fail loudly instead of being routed
 * to an incorrect controls family.
 */
export declare function assertKnownGraphControlType(controlType: string): GraphControlItem["controlType"];
/**
 * Computes final control render order from authored controlOrder priorities.
 *
 * For slot n (1-indexed):
 * 1) Prefer remaining controls with order in [1..n], picking lowest order first.
 * 2) Else take next control with order 0.
 * 3) Else take the remaining control with the lowest order > n.
 *
 * Relative order within each controlOrder level always follows input order.
 *
 * Contract: All payloads in graphicalDescendantsForControls are guaranteed to
 * have finite non-negative integer controlOrder values. Non-finite values
 * (Infinity, NaN) are normalized to 0 by the worker's extractFiniteControlOrder
 * before payloads are created, so the renderer can assume safe finite values.
 */
export declare function sortGraphControlsForDisplay(controls: GraphControlItem[]): GraphControlItem[];
/**
 * Normalize graph-level controls mode from core SVs.
 *
 * Invalid or missing values are treated as "none" so renderers do not show
 * controls unless explicitly requested by authored content/core state.
 */
export declare function normalizeGraphControlsMode(value: unknown): GraphControlsMode;
/**
 * Point-level controls mode parser.
 *
 * Invalid or missing values are treated as "both" so an individual point
 * keeps legacy behavior unless it explicitly opts out of an axis.
 */
export declare function normalizePointControlsMode(value: unknown): PointControlsMode;
export declare function normalizeCircleControlsMode(value: unknown): CircleControlsMode;
export declare function normalizeRegularPolygonControlsMode(value: unknown): RegularPolygonControlsMode;
export declare function normalizePolygonControlsMode(value: unknown): PolygonControlsMode;
export declare function normalizeTriangleControlsMode(value: unknown): TriangleControlsMode;
export declare function normalizeRectangleControlsMode(value: unknown): RectangleControlsMode;
/**
 * Line-segment controls mode parser.
 *
 * Invalid or missing values are treated as "endpoints".
 */
export declare function normalizeLineSegmentControlsMode(value: unknown): LineSegmentControlsMode;
/**
 * Vector controls mode parser.
 *
 * Invalid or missing values are treated as "displacement".
 */
export declare function normalizeVectorControlsMode(value: unknown): VectorControlsMode;
/**
 * Remove stale entries from an input state record when active controls change.
 *
 * Returns the original object when no keys were removed so React can avoid
 * unnecessary rerenders caused by identity changes.
 */
export declare function pruneRecordByActiveKeys(previousRecord: Record<string, string>, activeKeys: Set<string>): Record<string, string>;
/**
 * Generate an error message ID for input keys used across graph control families.
 */
export declare function makeInputErrorId(elementId: string, controlFamily: string, inputKey: string): string;
/**
 * Build a role-aware input key for point-like control draft/error state.
 */
export declare function makePointLikeInputKey(componentIdx: number, pointRole: PointMoveRole, suffix: PointLikeInputSuffix, kind: "draft" | "error"): string;
/**
 * Build a role-aware key for point-like transient slider state.
 */
export declare function makePointLikeTransientAxisKey(componentIdx: number, pointRole: PointMoveRole, axis: GraphControlAxis): string;
export declare function makePointLikeDraftKey(componentIdx: number, pointRole: PointMoveRole, suffix: PointLikeInputSuffix): string;
/**
 * Build a role-aware draft key for scalar control state.
 */
export declare function makeScalarDraftKey(componentIdx: number, scalarRole: ScalarControlRole): string;
/**
 * Build a role-aware transient key for scalar slider state.
 */
export declare function makeScalarTransientKey(componentIdx: number, scalarRole: ScalarControlRole): string;
/**
 * Normalize slider bounds for reversed graph axis ranges.
 */
export declare function normalizedSliderBounds(rawMin: number, rawMax: number): {
    min: number;
    max: number;
};
//# sourceMappingURL=model.d.ts.map