11import { $t } from '../../localization' ;
22import { SmartFormViewer } from './smartFormViewer' ;
33import { ReactToolDefinitionFrom } from '../../types' ;
4- import { SmartFormBase } from './types' ;
4+ import { SmartFormBase , SmartFormValues } from './types' ;
55import { ASSETS_BASE_URL } from '../../constants' ;
66import {
77 alignmentProperty ,
@@ -18,6 +18,7 @@ import {
1818 SubscriptionListProperty ,
1919 availableFields ,
2020} from './helper' ;
21+ import { urlProperty } from '../../properties/url' ;
2122
2223const DEFAULT_GREEN_COLOR = '#64BF91' ;
2324
@@ -36,6 +37,9 @@ export const getSmartFormToolDefinition: () =>
3637 options : {
3738 display : behaviorListProperty ( ) ,
3839 congratBehavior : congratsBehaviorListProperty ( ) ,
40+ congratUrl : urlProperty ( {
41+ label : $t ( '_dp.smart_forms.behavior.congratsUrl.label' ) ,
42+ } ) ,
3943 descriptionHtml : richTextProperty ( {
4044 label : $t ( '_dp.smart_forms.behavior.message' ) ,
4145 } ) ,
@@ -212,5 +216,13 @@ export const getSmartFormToolDefinition: () =>
212216 } ,
213217 } ,
214218 } ,
219+ propertyStates : ( values : SmartFormValues ) => ( {
220+ congratUrl : {
221+ enabled : values . congratBehavior === 'url' ,
222+ } ,
223+ descriptionHtml : {
224+ enabled : values . congratBehavior === 'message' ,
225+ } ,
226+ } ) ,
215227 } ;
216228} ;
0 commit comments