import { PayloadAction } from '@reduxjs/toolkit';
import { WebformStateCondition } from '@ws-ui/shared';

export type ISavedConditionsState = {
    state: 'loading' | 'loaded' | 'error' | 'unknown';
    conditions: WebformStateCondition[];
    error?: string;
};
export declare const deepDeleteCondition: (condition: WebformStateCondition, targetId: string) => WebformStateCondition | null;
export declare const deepSanitizeCondition: (condition: WebformStateCondition) => WebformStateCondition;
declare const stateSlice: import('@reduxjs/toolkit').Slice<ISavedConditionsState, {
    updateSavedConditions: (state: import('immer/dist/internal').WritableDraft<ISavedConditionsState>, action: PayloadAction<{
        conditions: WebformStateCondition[];
    }>) => import('immer/dist/internal').WritableDraft<ISavedConditionsState>;
    setSavedCondition: (state: import('immer/dist/internal').WritableDraft<ISavedConditionsState>, action: PayloadAction<{
        id: string;
        condition: WebformStateCondition;
    }>) => import('immer/dist/internal').WritableDraft<ISavedConditionsState>;
    updateSavedConditionDs: (state: import('immer/dist/internal').WritableDraft<ISavedConditionsState>, action: PayloadAction<{
        old_reference: string;
        new_reference: string;
    }>) => void;
    addSavedCondition: (state: import('immer/dist/internal').WritableDraft<ISavedConditionsState>, action: PayloadAction<WebformStateCondition>) => import('immer/dist/internal').WritableDraft<ISavedConditionsState>;
    removeSavedCondition: (state: import('immer/dist/internal').WritableDraft<ISavedConditionsState>, action: PayloadAction<{
        id: string;
    }>) => import('immer/dist/internal').WritableDraft<ISavedConditionsState>;
    initSavedConditions: (state: import('immer/dist/internal').WritableDraft<ISavedConditionsState>, action: PayloadAction<{
        conditions: WebformStateCondition[];
    }>) => import('immer/dist/internal').WritableDraft<ISavedConditionsState>;
}, "shared-conditions">;
export declare const updateSavedConditions: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
    conditions: WebformStateCondition[];
}, "shared-conditions/updateSavedConditions">, setSavedCondition: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
    id: string;
    condition: WebformStateCondition;
}, "shared-conditions/setSavedCondition">, updateSavedConditionDs: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
    old_reference: string;
    new_reference: string;
}, "shared-conditions/updateSavedConditionDs">, addSavedCondition: import('@reduxjs/toolkit').ActionCreatorWithPayload<WebformStateCondition, "shared-conditions/addSavedCondition">, removeSavedCondition: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
    id: string;
}, "shared-conditions/removeSavedCondition">, initSavedConditions: import('@reduxjs/toolkit').ActionCreatorWithPayload<{
    conditions: WebformStateCondition[];
}, "shared-conditions/initSavedConditions">;
export default stateSlice;
