/**
 * JSON Schema–shaped descriptors and pure resolution/validation helpers for the chart plan builder.
 * UI code consumes only these exports — no field-specific logic in the Lit component.
 */
export type JsonSchemaNode = JsonSchemaString | JsonSchemaNumber | JsonSchemaInteger | JsonSchemaBoolean | JsonSchemaNull | JsonSchemaObject | JsonSchemaArray | JsonSchemaAnyOf;
export interface JsonSchemaString {
    const?: string;
    enum?: string[];
    title?: string;
    type: 'string';
}
export interface JsonSchemaNumber {
    title?: string;
    type: 'number';
}
export interface JsonSchemaInteger {
    title?: string;
    type: 'integer';
}
export interface JsonSchemaBoolean {
    title?: string;
    type: 'boolean';
}
export interface JsonSchemaNull {
    type: 'null';
}
export interface JsonSchemaObject {
    additionalProperties?: boolean;
    allOf?: SchemaConditional[];
    properties?: Record<string, JsonSchemaNode>;
    required?: string[];
    title?: string;
    type: 'object';
}
export interface JsonSchemaArray {
    items: JsonSchemaNode;
    title?: string;
    type: 'array';
}
export interface JsonSchemaAnyOf {
    anyOf: JsonSchemaNode[];
    title?: string;
}
export interface SchemaConditional {
    else?: JsonSchemaNode;
    if?: JsonSchemaNode;
    then?: JsonSchemaNode;
}
export type PathSegment = string | number;
/** Root schema instance built once; filter node uses a cyclic `anyOf`. */
export interface ChartPlanSchemaRoot {
    root: JsonSchemaObject;
}
export declare function isAnyOfSchema(n: JsonSchemaNode): n is JsonSchemaAnyOf;
export declare function isObjectSchema(n: JsonSchemaNode): n is JsonSchemaObject;
export declare function isArraySchema(n: JsonSchemaNode): n is JsonSchemaArray;
export declare function isNullSchema(n: JsonSchemaNode): n is JsonSchemaNull;
export declare function isStringSchema(n: JsonSchemaNode): n is JsonSchemaString;
export declare function isBooleanSchema(n: JsonSchemaNode): n is JsonSchemaBoolean;
export declare function isIntegerSchema(n: JsonSchemaNode): n is JsonSchemaInteger;
export declare function isNumberSchema(n: JsonSchemaNode): n is JsonSchemaNumber;
export declare function pathKey(path: PathSegment[]): string;
export declare function getAt(data: unknown, path: PathSegment[]): unknown;
export declare function setAt(data: unknown, path: PathSegment[], value: unknown): unknown;
export declare function deleteAt(data: unknown, path: PathSegment[]): unknown;
declare function insertAtArray(data: unknown, pathToArray: PathSegment[], item: unknown): unknown;
export declare function matchesIf(ifSchema: JsonSchemaNode, data: unknown): boolean;
export declare function mergeObjectSchemas(base: JsonSchemaObject, patch: JsonSchemaObject): JsonSchemaObject;
export declare function resolveEffectiveObjectSchema(schema: JsonSchemaObject, data: unknown): JsonSchemaObject;
/** All property keys that may appear for an object schema (base + conditional then/else). */
export declare function collectDeclaredKeys(schema: JsonSchemaObject): Set<string>;
/** Resolves a property definition for UI (including disabled branch fields). */
export declare function findDeclaredPropertySchema(root: JsonSchemaObject, key: string): JsonSchemaNode | undefined;
export declare function unwrapJsonSchemaNode(node: JsonSchemaNode): {
    inner: JsonSchemaNode;
    nullable: boolean;
};
export declare function pickMatchingAnyOfIndex(schema: JsonSchemaAnyOf, data: unknown): number;
export declare function defaultForAnyOfBranch(schema: JsonSchemaAnyOf, branchIndex: number): Record<string, unknown>;
export declare function createDefaultForNode(node: JsonSchemaNode): unknown;
export declare function createInitialData(rootSchema: JsonSchemaObject): unknown;
export declare function stripEmptyDeep(value: unknown): unknown;
export declare function validateNode(node: JsonSchemaNode, value: unknown, path: PathSegment[], errors: Map<string, string>): void;
export declare function validateRoot(rootSchema: JsonSchemaObject, data: unknown): Map<string, string>;
export declare const CHART_PLAN_QUERY_SCHEMA: JsonSchemaObject;
export declare const chartPlanSchemaApi: {
    collectDeclaredKeys: typeof collectDeclaredKeys;
    createInitialData: typeof createInitialData;
    defaultForAnyOfBranch: typeof defaultForAnyOfBranch;
    deleteAt: typeof deleteAt;
    getAt: typeof getAt;
    insertAtArray: typeof insertAtArray;
    pathKey: typeof pathKey;
    pickMatchingAnyOfIndex: typeof pickMatchingAnyOfIndex;
    resolveEffectiveObjectSchema: typeof resolveEffectiveObjectSchema;
    setAt: typeof setAt;
    stripEmptyDeep: typeof stripEmptyDeep;
    validateRoot: typeof validateRoot;
};
export {};
