(()=>{"use strict";var e={243(){function e(o){var t,l,a="";if("string"==typeof o||"number"==typeof o)a+=o;else if("object"==typeof o)if(Array.isArray(o)){var n=o.length;for(t=0;t<n;t++)o[t]&&(l=e(o[t]))&&(a&&(a+=" "),a+=l)}else for(l in o)o[l]&&(a&&(a+=" "),a+=l);return a}const o=function(){for(var o,t,l=0,a="",n=arguments.length;l<n;l++)(o=arguments[l])&&(t=e(o))&&(a&&(a+=" "),a+=t);return a},t=window.wp.blocks,l=window.wp.components,a=window.wp.blockEditor,n=window.wp.i18n,r=JSON.parse('{"UU":"pronamic/form-control"}'),i=window.ReactJSXRuntime,s=["textarea","text","search","url","tel","email","password","number"];(0,t.registerBlockType)(r.UU,{edit:({attributes:e,setAttributes:t})=>{const{name:r,value:p,reference:m,required:c,placeholder:u}=e,d={autoComplete:"off",placeholder:e.placeholder,type:e.type,onChange:e=>{t({value:e.target.value})}},_=(0,a.useBlockProps)(),x=(0,a.__experimentalUseColorProps)(e),y=(0,a.__experimentalUseBorderProps)(e),h=o("wp-block-pronamic-form-control__element",x.className,y.className);d.className=h,d.style={...x.style,...y.style},d.defaultValue=e.value;const f="textarea"===e.type?"textarea":"input";return["textarea","radio","checkbox"].includes(e.type)||(d.type="pronamic-"+e.type),(0,i.jsxs)("div",{..._,children:[(0,i.jsx)(a.InspectorControls,{children:(0,i.jsxs)(l.PanelBody,{title:(0,n.__)("Settings","pronamic-pay-doneren-met-mollie"),children:[(0,i.jsx)(l.SelectControl,{label:(0,n.__)("Type","pronamic-pay-doneren-met-mollie"),value:e.type,options:[{label:(0,n.__)("Text","pronamic-pay-doneren-met-mollie"),value:"text"},{label:(0,n.__)("Textarea","pronamic-pay-doneren-met-mollie"),value:"textarea"},{label:(0,n.__)("Password","pronamic-pay-doneren-met-mollie"),value:"password"},{label:(0,n.__)("URL","pronamic-pay-doneren-met-mollie"),value:"url"},{label:(0,n.__)("Email address","pronamic-pay-doneren-met-mollie"),value:"email"},{label:(0,n.__)("Telephone number","pronamic-pay-doneren-met-mollie"),value:"tel"},{label:(0,n.__)("Checkbox","pronamic-pay-doneren-met-mollie"),value:"checkbox"},{label:(0,n.__)("Radio","pronamic-pay-doneren-met-mollie"),value:"radio"}],onChange:e=>{t({type:e})}}),(0,i.jsx)(l.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Required","pronamic-pay-doneren-met-mollie"),help:(0,n.__)("Select this option to make the input required.","pronamic-pay-doneren-met-mollie"),checked:c,onChange:e=>{t({required:e})}}),s.includes(e.type)&&(0,i.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,n.__)("Placeholder","pronamic-pay-doneren-met-mollie"),help:(0,n.__)("Text that appears in the form element when no value has been entered.","pronamic-pay-doneren-met-mollie"),value:u,onChange:e=>{t({placeholder:e})}})]})}),(0,i.jsxs)(a.InspectorControls,{group:"advanced",children:[(0,i.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,n.__)("Name","pronamic-pay-doneren-met-mollie"),value:r,onChange:e=>{t({name:e})}}),(0,i.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,n.__)("Value","pronamic-pay-doneren-met-mollie"),value:p,onChange:e=>{t({value:e})}}),(0,i.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,n.__)("Reference","pronamic-pay-doneren-met-mollie"),value:m,onChange:e=>{t({reference:e})}})]}),(0,i.jsx)(f,{...d})]})},save:({attributes:e})=>{const t=(0,a.__experimentalGetColorClassesAndStyles)(e),l=(0,a.__experimentalGetBorderClassesAndStyles)(e),n=function(e,t={}){return e.name&&(t.name=e.name),e.required&&(t.required="required"),s.includes(e.type)&&e.placeholder&&(t.placeholder=e.placeholder),t.className=o("wp-block-pronamic-form-control__element",t.className),t.value=e.value,"textarea"===e.type?(0,i.jsx)("textarea",{...t}):(t.type||(t.type=e.type),(0,i.jsx)("input",{...t}))}(e,{className:o(t.className,l.className),style:{...t.style,...l.style}}),r=a.useBlockProps.save();return(0,i.jsx)("div",{...r,children:n})}})}};const o={};function t(l){const a=o[l];if(void 0!==a)return a.exports;const n=o[l]={exports:{}};return e[l](n,n.exports,t),n.exports}t.m=e,(()=>{const e=[];t.O=(o,l,a,n)=>{if(l){n=n||0;for(var r=e.length;r>0&&e[r-1][2]>n;r--)e[r]=e[r-1];return void(e[r]=[l,a,n])}let i=1/0;for(r=0;r<e.length;r++){let[l,a,n]=e[r],p=!0;for(var s=0;s<l.length;s++)(!1&n||i>=n)&&Object.keys(t.O).every(e=>t.O[e](l[s]))?l.splice(s--,1):(p=!1,n<i&&(i=n));if(p){e.splice(r--,1);const t=a();void 0!==t&&(o=t)}}return o}})(),t.o=(e,o)=>Object.hasOwn(e,o),(()=>{const e={336:0,40:0};t.O.j=o=>0===e[o];const o=(o,l)=>{let[a,n,r]=l;var i,s,p=0;if(a.some(o=>0!==e[o])){for(i in n)t.o(n,i)&&(t.m[i]=n[i]);if(r)var m=r(t)}for(o&&o(l);p<a.length;p++)s=a[p],t.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return t.O(m)},l=globalThis.webpackChunk_pronamic_pronamic_pay_doneren_met_mollie||=[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))})();let l=t.O(void 0,[40],()=>t(243));l=t.O(l)})();