import { JsonValue, Rule, RuleAll, RuleAny, RuleValidationIssue } from '@limetech/lime-web-components';
/**
 * Address of a node in a {@link Rule} tree. Numeric keys index into a
 * combinator's `rules`; the string `'rules'` or `'rule'` steps from a
 * combinator into its children container.
 */
export type RulePath = (string | number)[];
/**
 * Remove the node at `path`.
 *
 * Removing the root yields an empty `all`-group so the tree always has
 * something to render. Returns `rule` unchanged when `path` does not
 * address a removable node.
 * @param rule
 * @param path
 */
export declare function deleteNode(rule: Rule, path: RulePath): Rule;
/**
 * Replace the `args` of a `ref` node. Returns `rule` unchanged when
 * `path` does not resolve to a `ref`.
 * @param rule
 * @param path
 * @param args
 */
export declare function updateArgs(rule: Rule, path: RulePath, args: JsonValue): Rule;
/**
 * Replace the node at `path` with `replacement`, returning a new rule
 * tree. Used by callers that need to apply a non-atomic change as a
 * single emit (e.g. updating a group's whole `rules` array at once).
 * @param rule
 * @param path
 * @param replacement
 */
export declare function replaceNode(rule: Rule, path: RulePath, replacement: Rule): Rule;
/**
 * Wrap `group` in a `not` when `isNegated`, otherwise return it
 * unchanged. Used when re-emitting a group whose negation flag should
 * be preserved.
 * @param group
 * @param isNegated
 */
export declare function wrapNegated(group: RuleAll | RuleAny, isNegated: boolean): Rule;
/**
 * Append `child` to a group's `rules`, returning a new group. The
 * input is not mutated.
 * @param group
 * @param child
 */
export declare function appendChild(group: RuleAll | RuleAny, child: Rule): RuleAll | RuleAny;
/**
 * Structural equality on two paths.
 * @param a
 * @param b
 */
export declare function pathsEqual(a: RulePath, b: RulePath): boolean;
/**
 * Filter validation issues to those whose `path` matches `path`.
 * @param issues
 * @param path
 */
export declare function issuesAt(issues: RuleValidationIssue[], path: RulePath): RuleValidationIssue[];
//# sourceMappingURL=rule-operations.d.ts.map