import { GBaseStep } from '../@Types/GenericFormSteps'; import { ValuesStore } from '../States/SiteSlice'; import { RootState } from '../Utils/store'; import { Form } from '../@Types'; import { DependencyStore } from '../Form/Form'; import { FormStep } from '../@Types/FormStep'; import { FieldError, RefCallBack, UseControllerProps, useController } from 'react-hook-form'; import { Condition } from '../@Types/Condition'; import { CBRFormStep } from '../@Types/CBRFormStep'; export declare const selectOriginalValue: ((state: RootState, step: GBaseStep) => any) & import("reselect").OutputSelectorFields<(args_0: ValuesStore, args_1: GBaseStep) => any, { clearCache: () => void; }> & { clearCache: () => void; }; export interface StepDependency { originalValue: any; isDependency: boolean; handleStepDep: (value: any | undefined) => void; } export declare const useStepDependency: (step: GBaseStep, defaultValue?: any) => StepDependency; export declare const selectStepDependencies: ((state: RootState, step: GBaseStep, form: Form) => { invalids: string[]; emptyDep: boolean; }) & import("reselect").OutputSelectorFields<(args_0: DependencyStore, args_1: GBaseStep, args_2: Form) => { invalids: string[]; emptyDep: boolean; }, { clearCache: () => void; }> & { clearCache: () => void; }; export interface UseFormStepOptions { defaultValue: ValueType; /** If true, will not trigger onChange until the user has finished typing */ debounce?: boolean; rules?: UseControllerProps['rules']; /** If the step should trigger a filler(root StepFiller) size change */ sizeChange?: boolean; } export interface FormStepFunctions { value: ValueType; ref: RefCallBack; onChange: (value: ValueType) => void; error: FieldError | undefined; field: Omit['field'], 'ref' | 'value' | 'onChange'>; } export declare const useFormStep: (step: GBaseStep, { rules, debounce, sizeChange, defaultValue }: UseFormStepOptions) => FormStepFunctions; export declare const selectDependencies: ((state: RootState, idDeps: string[] | undefined) => DependencyStore) & import("reselect").OutputSelectorFields<(args_0: DependencyStore, args_1: string[]) => DependencyStore, { clearCache: () => void; }> & { clearCache: () => void; }; export declare const useCondition: (condition?: Condition) => boolean; export declare const calcStepDeps: (step: FormStep | CBRFormStep) => string[]; export declare const recursivelyCalcConditionSteps: (condition: Condition | undefined) => string[];