import type { App_RoutingForms_Form } from '../../../prisma-client';
import type { JsonGroup, JsonItem, JsonRule, JsonTree } from "react-awesome-query-builder";
import type { Attribute } from "../types/types";
import type { LocalRoute } from "../types/types";
import type { FormResponse, SerializableForm } from "../types/types";
import type { SerializableField } from "../types/types";
type GetFieldResponse = ({ field, fieldResponseValue, }: {
    fieldResponseValue: FormResponse[keyof FormResponse]["value"];
    field: Pick<SerializableField, "type" | "options">;
}) => {
    value: string | number | string[];
};
export declare const raqbQueryValueUtils: {
    isQueryValueARuleGroup: (queryValue: JsonTree) => queryValue is JsonGroup;
    isARule: (rule: JsonItem) => rule is JsonRule;
    getValueTypeFromAttributesQueryValueForRaqbField: ({ attributesQueryValue, raqbFieldId, }: {
        attributesQueryValue: JsonTree;
        raqbFieldId: string;
    }) => null;
    isQueryValueEmpty: (queryValue: JsonTree | null) => queryValue is null;
};
declare function getAttributesData({ attributesData, attributesQueryValue, }: {
    attributesData: Record<string, {
        value: string | string[];
        type: Attribute["type"];
    }>;
    attributesQueryValue: NonNullable<LocalRoute["attributesQueryValue"]>;
}): Record<string, string | string[]>;
declare function getAttributesQueryValue({ attributesQueryValue, attributes, response, fields, getFieldResponse, }: {
    attributesQueryValue: LocalRoute["attributesQueryValue"];
    attributes: Attribute[];
    response: FormResponse;
    fields: SerializableField[] | undefined;
    getFieldResponse: GetFieldResponse;
}): ({
    type: "group" | "switch_group";
    id?: string | undefined;
    children1?: any;
    properties?: any;
} & import("zod").BRAND<"attributesQueryValue">) | null;
declare function getAttributesQueryBuilderConfig({ form, attributes, attributesQueryValue, }: {
    form: Pick<SerializableForm<App_RoutingForms_Form>, "fields">;
    attributes: Attribute[];
    attributesQueryValue: NonNullable<LocalRoute["attributesQueryValue"]>;
}): {
    fields: {
        [k: string]: {
            type: string;
            fieldSettings: {
                listValues: {
                    value: string;
                    title: string;
                }[] | undefined;
            };
            label: string;
            valueSources: ["value"];
        };
    };
    operators: {
        [x: string]: import("../components/react-awesome-query-builder/config/BasicConfig").Operator;
    };
    conjunctions: {
        [x: string]: import("../components/react-awesome-query-builder/config/BasicConfig").Conjunction;
    };
    types: import("../components/react-awesome-query-builder/config/BasicConfig").Types;
    widgets: import("react-awesome-query-builder").Widgets & {
        [x: string]: import("react-awesome-query-builder").Widget & {
            type: string;
        };
    };
    settings: import("react-awesome-query-builder").Settings;
};
/**
 * Utilities to establish compatibility between formFieldQueryValue and attributeQueryValue
 */
export declare const acrossQueryValueCompatiblity: {
    getAttributesQueryBuilderConfig: typeof getAttributesQueryBuilderConfig;
    getAttributesQueryValue: typeof getAttributesQueryValue;
    getAttributesData: typeof getAttributesData;
};
export {};
//# sourceMappingURL=raqbUtils.d.ts.map