import { EventEmitter } from '../../stencil-public-runtime';
import { FormComponent } from '@limetech/lime-elements';
import { ContextMap, LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Rule } from '@limetech/lime-web-components';
/**
 * Tree editor for {@link Rule}.
 *
 * Renders a `Rule` value as a tree of nodes. Lets an author pick
 * primitive refs in `all` / `any` groups, toggle negation, delete
 * nodes, and edit per-primitive args via the editor declared on each
 * primitive's metadata.
 *
 * The component is value-in / value-out. Pass `value` and listen for
 * `change`; persistence is the caller's concern.
 *
 * Pass `availableContexts` to forward the list of context keys the
 * caller knows will be available where the rule runs. The component
 * forwards it to `RuleRegistry.validate` so `missing-slot` diagnostics
 * surface inline on the offending nodes.
 *
 * @exampleComponent limebb-example-rule-editor
 *
 * @alpha
 * @private
 */
export declare class RuleEditor implements LimeWebComponent, FormComponent<Rule | undefined> {
    platform: LimeWebComponentPlatform;
    context: LimeWebComponentContext;
    /**
     * @inheritdoc
     */
    value: Rule | undefined;
    /**
     * Context keys the caller knows will be available where the rule
     * runs. Forwarded to the rule registry's `validate` method so
     * `missing-slot` issues surface inline. Leave unset when the
     * evaluation context is not known (typical for editors that target
     * the saved-rule library).
     */
    availableContexts?: (keyof ContextMap)[];
    /**
     * @inheritdoc
     */
    required: boolean;
    /**
     * The mutation UI (delete and negate toggles, add-group button) is
     * hidden when set. The args editor for each ref is still rendered,
     * with `readonly` forwarded to it.
     *
     * @inheritdoc
     */
    readonly: boolean;
    /**
     * The mutation UI is hidden when set. The args editor is rendered
     * with `disabled` forwarded to it.
     *
     * @inheritdoc
     */
    disabled: boolean;
    /**
     * @inheritdoc
     */
    label: string;
    /**
     * @inheritdoc
     */
    helperText: string;
    /**
     * Emitted when the rule tree is mutated. Detail is the new rule, or
     * `undefined` when the user has cleared the editor to an empty root
     * group — callers can persist `undefined` as "no rule" without
     * having to inspect the rule shape themselves.
     */
    change: EventEmitter<Rule | undefined>;
    private issues;
    private openChipPath;
    private metadataById;
    private primitiveOptions;
    private normalizedCache;
    componentWillLoad(): void;
    componentDidLoad(): void;
    protected onValueChange(): void;
    protected onAvailableContextsChange(): void;
    render(): any;
    private renderLabel;
    private renderHelperText;
    private createRenderContext;
    private handleDelete;
    private handleUpdateArgs;
    private handleReplaceNode;
    private handleChipInteract;
    private handlePopoverClose;
    private indexMetadata;
    private runValidation;
    private emitIfChanged;
    /**
     * Wrap any non-group `value` in a top-level `all` so the editor
     * always has a group to render against. When `value` is unset,
     * returns a fresh empty `all`-group as a render-only placeholder —
     * `emitNormalization` will *not* push that placeholder back to the
     * caller, so an unset value stays unset until the user edits.
     *
     * Memoized so callers that read this several times in one handler
     * see the same reference — the identity check in `emitIfChanged`
     * depends on it.
     */
    private get normalizedValue();
    /**
     * If `value` wasn't already a group, emit the normalized form so
     * the caller's stored state catches up. Skipped when `value` is
     * unset — we render a placeholder group locally but don't push it
     * back to the caller, so callers can't tell "no rule yet" apart
     * from "user cleared a rule" by inspecting the emitted shape.
     * Returns `true` when an emit happened so callers can short-circuit.
     */
    private emitNormalization;
    private get ruleRegistry();
}
//# sourceMappingURL=rule-editor.d.ts.map