import { type ComponentPropsWithoutRef, type ReactNode } from "react";
export interface ConditionField {
    value: string;
    label: string;
    icon?: ReactNode;
    description?: string;
}
export interface ConditionOperator {
    value: string;
    label: string;
    symbol?: string;
    description?: string;
}
export interface Condition {
    field: string;
    operator: string;
    value: string;
    /** Per-row join operator — joins this condition to the one above it.
     * Only used when the builder is in `joinMode="per-row"`. The first
     * condition's value is ignored (nothing to join to). */
    joinOperator?: "AND" | "OR";
}
export interface ConditionGroup {
    type: "group";
    joinOperator: "AND" | "OR";
    conditions: (Condition | ConditionGroup)[];
}
export interface ConditionBuilderProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
    conditions: Condition[];
    onChange: (conditions: Condition[]) => void;
    fields: ConditionField[];
    operators: ConditionOperator[];
    /** Auto-enables search above 8 options. Force on/off via boolean. */
    searchable?: boolean;
    allowGroups?: boolean;
    /** Join-operator scope:
     *   - `"global"` (default) — one operator joins every condition. Toggling
     *     any row's button switches it for all rows. Use when the group
     *     semantically reads as "match ALL" / "match ANY".
     *   - `"per-row"` — each condition carries its own `joinOperator`,
     *     which can be mixed freely (Notion / Linear / Airtable style).
     *     The toggle on each row affects only that row.
     */
    joinMode?: "global" | "per-row";
    /** Global join operator. Used in `joinMode="global"` (the default), and
     * as the default value for newly-added rows in `joinMode="per-row"`. */
    joinOperator?: "AND" | "OR";
    /** Fires when the global join operator changes. Only used in
     * `joinMode="global"`. (Per-row toggles flow through `onChange`.) */
    onJoinChange?: (join: "AND" | "OR") => void;
    /** Custom label for the "Add condition" button. */
    addLabel?: ReactNode;
    /** Custom aria-label for the remove buttons. Defaults to "Remove condition". */
    removeLabel?: string;
}
export declare const ConditionBuilder: import("react").ForwardRefExoticComponent<ConditionBuilderProps & import("react").RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=ConditionBuilder.d.ts.map