"use strict";(globalThis.webpackChunkstec=globalThis.webpackChunkstec||[]).push([[7585],{85262:(e,t,a)=>{a.r(t),a.d(t,{InputCheckbox:()=>d,UncontrolledInputCheckbox:()=>s,default:()=>i});var l=a(8403),c=a(26878),n=a(75761),r=a(78565),u=a(10382);const s=e=>{const[t,a]=(0,c.useState)(void 0!==e.defaultValue&&e.defaultValue),[s,d]=(0,c.useState)(!1),[i,o]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{(s||e.wasSubmitted)&&o(!0===e.required&&!1===t)}),[t,e.required,e.wasSubmitted,s]),React.createElement(l.StecDiv,{className:"stec-checkbox-wrapper",title:e.hint},React.createElement("label",null,React.createElement(l.StecInputCheckBox,{checked:t,onChange:t=>{d(!0),a(t.target.checked),e.onChange&&e.onChange(t.target.checked)}}),React.createElement(r.default,{text:e.title})),React.createElement(u.default,{floating:!0,text:e.errorMessage,display:i}),React.createElement(n.default,{text:e.description}),e.name&&React.createElement("input",{type:"hidden",required:e.required,name:e.name,value:t}))},d=e=>{const[t,a]=(0,c.useState)(!1),[s,d]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{(t||e.wasSubmitted)&&d(!0===e.required&&!1===e.value)}),[e.value,e.required,t,e.wasSubmitted]),React.createElement(l.StecDiv,{className:"stec-checkbox-wrapper",title:e.hint},React.createElement("label",null,React.createElement(l.StecInputCheckBox,{checked:e.value,onChange:t=>{a(!0),e.onChange&&e.onChange(t.target.checked)}}),React.createElement(r.default,{text:e.title})),React.createElement(u.default,{floating:!0,text:e.errorMessage,display:s}),React.createElement(n.default,{text:e.description}),e.name&&React.createElement("input",{type:"hidden",required:e.required,name:e.name,value:e.value}))},i=d},39393:(e,t,a)=>{a.r(t),a.d(t,{InputTextarea:()=>i,UncontrolledInputTextarea:()=>d,default:()=>o});var l=a(8403),c=a(26878),n=a(75761),r=a(78565),u=a(13839),s=a(10382);const d=e=>{const[t,a]=(0,c.useState)(e.defaultValue||""),[d,i]=(0,c.useState)(!1),[o,m]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{if((d||e.wasSubmitted)&&e.regex){const a=new RegExp(e.regex).test(t);m(!1===a)}}),[t,e.regex,e.wasSubmitted,d]),React.createElement(l.StecDiv,{className:"stec-input-textarea-wrapper"},React.createElement("label",null,React.createElement(u.default,{style:{justifyContent:"space-between"}},React.createElement(r.default,{text:e.title})),React.createElement("textarea",{style:e.inputStyle,onBlur:()=>{i(!0)},type:"text",name:e.name,placeholder:e.placeholder,onChange:t=>{a(t.target.value),e.onChange&&e.onChange(t.target.value)},value:t}),React.createElement(s.default,{floating:!0,text:e.errorMessage,display:o}),React.createElement(n.default,{text:e.description})))},i=e=>{const[t,a]=(0,c.useState)(!1),[d,i]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{if((t||e.wasSubmitted)&&e.regex){const t=new RegExp(e.regex).test(e.value);i(!1===t)}}),[e.value,e.regex,e.wasSubmitted,t]),React.createElement(l.StecDiv,{className:"stec-input-textarea-wrapper"},React.createElement("label",null,React.createElement(u.default,{style:{justifyContent:"space-between"}},React.createElement(r.default,{text:e.title})),React.createElement("textarea",{style:e.inputStyle,onBlur:()=>{a(!0)},type:"text",name:e.name,placeholder:e.placeholder,onChange:t=>{e.onChange(t.target.value)},value:e.value}),React.createElement(s.default,{floating:!0,text:e.errorMessage,display:d}),React.createElement(n.default,{text:e.description})))},o=i}}]);