import { default as CxButton } from '../../../../../atoms/src/components/button/button.ts';
import { default as CxDetails } from '../../../../../atoms/src/components/details/details.ts';
import { default as CxInput } from '../../../../../atoms/src/components/input/input.ts';
import { default as CxOption } from '../../../../../atoms/src/components/option/option.ts';
import { default as CxSelect } from '../../../../../atoms/src/components/select/select.ts';
import { default as CxSpace } from '../../../../../atoms/src/components/space/space.ts';
import { default as CxSwitch } from '../../../../../atoms/src/components/switch/switch.ts';
import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
import { QueryConfig } from '../../../../../types/src/chart-plan-query';
import { PropertyValues, TemplateResult } from 'lit';
import { JsonSchemaObject } from './chart-plan-schema';

export type ChartPlanBuilderRenderContext = {
    disabled: boolean;
    /** From parent object's effective JSON Schema `required` for this property key. */
    required: boolean;
};
export default class CxChartPlanBuilder extends CortexElement {
    static readonly styles: import('lit').CSSResult[];
    static readonly dependencies: {
        'cx-button': typeof CxButton;
        'cx-details': typeof CxDetails;
        'cx-input': typeof CxInput;
        'cx-option': typeof CxOption;
        'cx-select': typeof CxSelect;
        'cx-space': typeof CxSpace;
        'cx-switch': typeof CxSwitch;
        'cx-typography': typeof CxTypography;
    };
    private readonly localize;
    /** Resolves schema nodes for path-keyed event handlers (cleared each update). */
    private readonly schemaByPath;
    /** JSON Schema root driving the form. */
    schema: JsonSchemaObject;
    /** Optional controlled value; when set, replaces the internal draft. */
    value: Record<string, unknown> | null;
    /** Internal form state mirroring output JSON. */
    private draft;
    private validationErrors;
    willUpdate(changed: PropertyValues<this>): void;
    runConnectedCallback(): void;
    handleSchemaChange(): void;
    handleValuePropertyChange(): void;
    /** Returns validation-clean JSON for the current draft. */
    serialize(): QueryConfig;
    private pathToAttr;
    private pathFromAttr;
    private pathFromDataChartPath;
    private rememberSchema;
    private revalidate;
    private emitPlanChange;
    private patch;
    private addArrayItem;
    private removeArrayItem;
    private applyAnyOfBranch;
    private fieldError;
    /** Native `required` on form controls; omit when disabled. */
    private controlRequired;
    handleArrayAddClick(e: Event): void;
    handleArrayRemoveClick(e: Event): void;
    handleAnyOfDiscriminatorChange(e: Event): void;
    handleNullableEnumClear(_e: Event): void;
    handleNullableEnumChange(e: Event): void;
    handleChartNumberInput(e: Event): void;
    handleTextInput(e: Event): void;
    handleLeafEnumSelectChange(e: Event): void;
    handleSwitchToggle(_e: Event): void;
    private renderError;
    private renderSchemaNode;
    private renderScalarAnyOfPlaceholder;
    private renderNullableScalar;
    private anyOfBranchSelectOptions;
    private renderAnyOfObject;
    private renderObject;
    private renderObjectBody;
    private renderArray;
    private renderLeaf;
    private renderLeafBoolean;
    private renderLeafString;
    private renderLeafNumeric;
    render(): TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-chart-plan-builder': CxChartPlanBuilder;
    }
}
