import{d as _,r as w,G as S,b as u,c as b,w as s,f as l,d2 as f,ez as m,e as x,b0 as K,eA as T,u as a,bu as p,c4 as C,c5 as y}from"./registerWidgets.e46eca28.js";import{R as E}from"./SmartConsole.13554642.js";import{a as F,A as c}from"./Title.6ee361e2.js";import{F as I}from"./Form.6fcc3ee8.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="abcfe9a8-0d62-45cf-9b5a-71b6445a6211",r._sentryDebugIdIdentifier="sentry-dbid-abcfe9a8-0d62-45cf-9b5a-71b6445a6211")}catch{}})();const A="forms_workspace_id_path_key",B="This path is already being used by another form or dash on your workspace",V=_({__name:"FormSettings",props:{form:{}},setup(r){const e=w(r.form),v=[{label:"General",props:[{label:"Form name",valueKey:"title"}]},{label:"Welcome Screen",props:[{label:"Title",valueKey:"welcomeTitle"},{label:"Subtitle",valueKey:"startMessage"},{label:"Start button text",valueKey:"startButtonText"}]},{label:"Ending Screen",props:[{label:"Title",valueKey:"endMessage"},{label:"Restart button text",valueKey:"restartButtonText"}]},{label:"Alert Messages",props:[{label:"Error message",valueKey:"errorMessage"}]}],h=S({pathError:null,sectionsShown:[!0,!1,!1]}),g=i=>{i.detail.includes(A)&&(h.pathError=B)};return addEventListener("hasura-error",g),(i,o)=>(u(),b(a(I),{layout:"vertical"},{default:s(()=>[l(E,{runtime:e.value},null,8,["runtime"]),(u(),f(p,null,m(v,t=>x("div",{key:t.label},[l(a(F),{level:3},{default:s(()=>[K(T(t.label),1)]),_:2},1024),(u(!0),f(p,null,m(t.props,n=>(u(),b(a(c),{key:n.label,label:n.label},{default:s(()=>[l(a(C),{type:"text",value:e.value[n.valueKey],onChange:k=>e.value[n.valueKey]=k.target.value},null,8,["value","onChange"])]),_:2},1032,["label"]))),128))])),64)),l(a(c),{label:"Start smart form automatically"},{default:s(()=>[l(a(y),{checked:e.value.autoStart,"onUpdate:checked":o[0]||(o[0]=t=>e.value.autoStart=t)},null,8,["checked"])]),_:1}),l(a(c),{label:"Allow the user to restart the smart form after it is over"},{default:s(()=>[l(a(y),{checked:e.value.allowRestart,"onUpdate:checked":o[1]||(o[1]=t=>e.value.allowRestart=t)},null,8,["checked"])]),_:1})]),_:1}))}});export{V as _};
//# sourceMappingURL=FormSettings.vue_vue_type_script_setup_true_lang.92ffe82c.js.map
