import type { ReactNode } from 'react'; import type { LunaticComponentDefinition, LunaticExpression, LunaticReducerState } from '../../type'; type UntranslatedProperties = 'expressions' | 'sections' | 'body' | 'item' | 'controls' | 'conditionFilter' | 'conditionReadOnly' | 'components' | 'optionFilter'; export type DeepTranslateExpression = T extends LunaticExpression ? ReactNode : T extends (infer ElementType)[] ? DeepTranslateExpression[] : T extends { [k: string | number]: unknown; } ? { [key in keyof T]: key extends UntranslatedProperties ? T[key] : DeepTranslateExpression; } : T; /** * Interpret every VTL expression inside a component * * ## Example * * For instance a component like this : * * ```json * { * "label": {"value": "\"Hello world\"", "type": "VTL"} * } * ``` * * Would see its expression interpreted like this * * ```json * { * "label": "Hello world" * } * ``` */ export declare function fillComponentExpressions(component: LunaticComponentDefinition, state: { executeExpression: LunaticReducerState['executeExpression']; pager: Pick; }): DeepTranslateExpression; export {};