import type { JsonGroup, JsonItem, JsonRule, JsonTree } from "react-awesome-query-builder";
import type { Config } from "react-awesome-query-builder";
import type { LocalRoute } from '../../app-store/routing-forms/types/types';
import type { dynamicFieldValueOperands } from './types';
import type { AttributeOptionValueWithType, AttributeOptionValue, Attribute } from '../service/attribute/server/getAttributes';
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;
};
export declare function buildEmptyQueryValue(): {
    id: string;
    type: "group";
};
export declare const buildStateFromQueryValue: ({ queryValue, config, }: {
    /**
     * Allow null as the queryValue as initially there could be no queryValue and without that we can't build the state and can't show the UI
     */
    queryValue: JsonTree | null;
    config: Config;
}) => {
    state: {
        tree: import("react-awesome-query-builder").ImmutableTree;
        config: Config;
    };
    queryValue: JsonTree;
};
export declare function getValueOfAttributeOption(attributeOptions: Pick<AttributeOptionValue, "isGroup" | "contains" | "value"> | Pick<AttributeOptionValue, "isGroup" | "contains" | "value">[]): string | string[];
declare function getAttributesData({ attributesData, }: {
    attributesData: Record<string, AttributeOptionValueWithType>;
    attributesQueryValue: NonNullable<LocalRoute["attributesQueryValue"]>;
}): Record<string, string | string[]>;
/** Gets the attributes that were used to generate the chosen route and their values */
declare function getAttributesQueryValue({ attributesQueryValue, attributes, dynamicFieldValueOperands, }: {
    attributesQueryValue: LocalRoute["attributesQueryValue"] | null;
    attributes: Attribute[];
    dynamicFieldValueOperands?: dynamicFieldValueOperands;
}): {
    type: "group";
    id?: string | undefined;
    children1?: Record<string, {
        type?: string | undefined;
        properties?: {
            field?: any;
            operator?: any;
            value?: any;
            valueSrc?: any;
            valueError?: (string | null)[] | undefined;
            valueType?: any;
        } | undefined;
    }> | undefined;
    properties?: any;
} | {
    type: "switch_group";
    id?: string | undefined;
    children1?: Record<string, {
        type?: string | undefined;
        properties?: {
            field?: any;
            operator?: any;
            value?: any;
            valueSrc?: any;
            valueError?: (string | null)[] | undefined;
            valueType?: any;
        } | undefined;
    }> | undefined;
    properties?: any;
} | null;
/**
 * Returns attributesQueryBuilderConfig with the list of labels instead of list of ids.
 */
export declare function getAttributesQueryBuilderConfigHavingListofLabels({ dynamicFieldValueOperands, attributes, }: {
    dynamicFieldValueOperands?: dynamicFieldValueOperands;
    attributes: Attribute[];
}): {
    fields: {
        [k: string]: {
            type: string;
            fieldSettings: {
                listValues: {
                    value: string;
                    title: string;
                }[] | undefined;
            };
            label: string;
            valueSources: ["value"];
        };
    };
    operators: {
        [x: string]: import('../../app-store/routing-forms/components/react-awesome-query-builder/config/BasicConfig').Operator;
    };
    conjunctions: {
        [x: string]: import("react-awesome-query-builder").Conjunction;
    };
    types: import('../../app-store/routing-forms/components/react-awesome-query-builder/config/BasicConfig').Types;
    widgets: import('../../app-store/routing-forms/components/react-awesome-query-builder/config/types').WidgetsWithoutFactory;
    settings: {
        groupActionsPosition: "bottomCenter";
        showErrorMessage: boolean;
        maxNesting: number;
        locale?: {
            moment?: string;
            antd?: Object;
            material?: Object;
            mui?: Object;
        };
        theme?: {
            material?: Object;
            mui?: Object;
        };
        valueLabel?: string;
        valuePlaceholder?: string;
        fieldLabel?: string;
        operatorLabel?: string;
        fieldPlaceholder?: string;
        funcPlaceholder?: string;
        funcLabel?: string;
        operatorPlaceholder?: string;
        lockLabel?: string;
        lockedLabel?: string;
        deleteLabel?: string;
        addGroupLabel?: string;
        addCaseLabel?: string;
        addDefaultCaseLabel?: string;
        defaultCaseLabel?: string;
        addRuleLabel?: string;
        addSubRuleLabel?: string;
        delGroupLabel?: string;
        notLabel?: string;
        valueSourcesPopupTitle?: string;
        removeRuleConfirmOptions?: {
            title?: string;
            okText?: string;
            okType?: string;
            cancelText?: string;
        };
        removeGroupConfirmOptions?: {
            title?: string;
            okText?: string;
            okType?: string;
            cancelText?: string;
        };
        renderField?: import("react").Factory<import("react-awesome-query-builder").FieldProps>;
        renderOperator?: import("react").Factory<import("react-awesome-query-builder").FieldProps>;
        renderFunc?: import("react").Factory<import("react-awesome-query-builder").FieldProps>;
        renderConjs?: import("react").Factory<import("react-awesome-query-builder").ConjsProps>;
        renderButton?: import("react").Factory<import("react-awesome-query-builder").ButtonProps>;
        renderButtonGroup?: import("react").Factory<import("react-awesome-query-builder").ButtonGroupProps>;
        renderSwitch?: import("react").Factory<import("react-awesome-query-builder").SwitchProps>;
        renderProvider?: import("react").Factory<import("react-awesome-query-builder").ProviderProps>;
        renderValueSources?: import("react").Factory<import("react-awesome-query-builder").ValueSourcesProps>;
        renderConfirm?: import("react-awesome-query-builder").ConfirmFunc;
        useConfirm?: () => Function;
        renderSize?: import("react-awesome-query-builder").AntdSize;
        dropdownPlacement?: import("react-awesome-query-builder").AntdPosition;
        showLabels?: boolean;
        maxLabelsLength?: number;
        customFieldSelectProps?: import("react-awesome-query-builder").AnyObject;
        renderBeforeWidget?: import("react").Factory<import("react-awesome-query-builder").FieldProps>;
        renderAfterWidget?: import("react").Factory<import("react-awesome-query-builder").FieldProps>;
        renderBeforeActions?: import("react").Factory<import("react-awesome-query-builder").FieldProps>;
        renderAfterActions?: import("react").Factory<import("react-awesome-query-builder").FieldProps>;
        renderRuleError?: import("react").Factory<import("react-awesome-query-builder").RuleErrorProps>;
        renderSwitchPrefix?: import("react").Factory<import("react-awesome-query-builder").AnyObject>;
        defaultSliderWidth?: string;
        defaultSelectWidth?: string;
        defaultSearchWidth?: string;
        defaultMaxRows?: number;
        valueSourcesInfo?: import("react-awesome-query-builder").ValueSourcesInfo;
        canCompareFieldWithField?: import("react-awesome-query-builder").CanCompareFieldWithField;
        canReorder?: boolean;
        canRegroup?: boolean;
        canRegroupCases?: boolean;
        showNot?: boolean;
        showLock?: boolean;
        canDeleteLocked?: boolean;
        setOpOnChangeField: Array<import("react-awesome-query-builder").ChangeFieldStrategy>;
        clearValueOnChangeField?: boolean;
        clearValueOnChangeOp?: boolean;
        canLeaveEmptyGroup?: boolean;
        canLeaveEmptyCase?: boolean;
        shouldCreateEmptyGroup?: boolean;
        forceShowConj?: boolean;
        immutableGroupsMode?: boolean;
        immutableFieldsMode?: boolean;
        immutableOpsMode?: boolean;
        immutableValuesMode?: boolean;
        maxNumberOfRules?: Number;
        maxNumberOfCases?: Number;
        canShortMongoQuery?: boolean;
        convertableWidgets?: import("react-awesome-query-builder").TypedMap<Array<string>>;
        removeEmptyGroupsOnLoad?: boolean;
        removeIncompleteRulesOnLoad?: boolean;
        fieldSeparator?: string;
        fieldSeparatorDisplay?: string;
        formatReverse?: import("react-awesome-query-builder").FormatReverse;
        sqlFormatReverse?: import("react-awesome-query-builder").SqlFormatReverse;
        spelFormatReverse?: import("react-awesome-query-builder").SpelFormatReverse;
        formatField?: import("react-awesome-query-builder").FormatField;
        formatSpelField?: import("react-awesome-query-builder").FormatSpelField;
        formarAggr?: import("react-awesome-query-builder").FormatAggr;
    };
};
/**
 * Utilities to establish compatibility between formFieldQueryValue and attributeQueryValue
 */
export declare const acrossQueryValueCompatiblity: {
    getAttributesQueryBuilderConfigHavingListofLabels: typeof getAttributesQueryBuilderConfigHavingListofLabels;
    getAttributesQueryValue: typeof getAttributesQueryValue;
    getAttributesData: typeof getAttributesData;
};
export {};
//# sourceMappingURL=raqbUtils.d.ts.map