(()=>{"use strict";var e,l={233:()=>{const e=window.wp.element,l=window.wp.blocks,t=window.wp.primitives,a=window.wp.blockEditor,r=window.wp.i18n,n=window.lodash,o=window.wp.components;(0,l.registerBlockType)("madeitforms/largeinput-field",{icon:(0,e.createElement)(t.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(t.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10"})),edit:function(l){const{attributes:t,setAttributes:i,className:c,clientId:s}=l,{required:d,name:u,label:m,default_value:p,placeholder:v}=t;null==u&&i({name:"field-"+(0,n.uniqueId)()});const f=(0,a.useBlockProps)({className:c}),h={className:"madeit-forms-largeinput-field",name:u,placeholder:v,disabled:!0};for(var b=wp.data.select("core/block-editor").getBlocks(),w=!0,g=0;g<b.length;g++)b[g].clientId!==s&&void 0!==b[g].attributes.name&&b[g].attributes.name===u&&(w=!1);return[(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(o.PanelBody,{title:(0,r.__)("Field settings"),initialOpen:!0},(0,e.createElement)(o.TextControl,{label:(0,r.__)("Label"),value:m,onChange:e=>i({label:e})}),(0,e.createElement)(o.TextControl,{label:(0,r.__)("Default Value"),value:p,onChange:e=>i({default_value:e})}),(0,e.createElement)(o.TextControl,{label:(0,r.__)("Placeholder"),value:v,onChange:e=>i({placeholder:e})}),(0,e.createElement)(o.ToggleControl,{label:(0,r.__)("Required"),checked:d,onChange:e=>i({required:e})}),(0,e.createElement)(o.TextControl,{label:(0,r.__)("Name"),help:(0,r.__)("Deze naam kan je gebruiken in de acties. Enkel letters, cijfers, - of _ zijn toegelaten."),value:u,onChange:e=>{e.toLowerCase().replace(/[^a-z0-9-_]/gi,""),i({name:e})}}))),(0,e.createElement)("div",null,(0,e.createElement)("div",f,(0,e.createElement)("div",null,(0,e.createElement)("label",null,m)),(0,e.createElement)("textarea",h,p)),!w&&(0,e.createElement)("div",{className:"ma-forms-input-error"},(0,r.__)("Duplicated name found. Make the name of this field unique.")))]},save:function(l){const{attributes:t,className:r,clientId:n}=l,{required:o,name:i,label:c,default_value:s,placeholder:d}=t,u=a.useBlockProps.save({className:r}),m={className:"madeit-forms-largeinput-field",name:i,required:o,placeholder:d};return(0,e.createElement)("div",u,null!=c&&c.length>0?(0,e.createElement)("div",null,(0,e.createElement)("label",null,c)):null,(0,e.createElement)("textarea",m,s))},deprecated:[{attributes:{required:{type:"boolean",default:!1},name:{type:"string"},default_value:{type:"string"},placeholder:{type:"string"},label:{type:"string"}},supports:{html:!1},save(l){const{attributes:t,className:r,clientId:n}=l,{required:o,name:i,label:c,default_value:s,placeholder:d}=t,u=a.useBlockProps.save({className:r}),m={className:"madeit-forms-largeinput-field",name:i,required:o,placeholder:d};return(0,e.createElement)("div",u,(0,e.createElement)("div",null,(0,e.createElement)("label",null,c)),(0,e.createElement)("textarea",m,s))}}]})}},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={exports:{}};return l[e](n,n.exports,a),n.exports}a.m=l,e=[],a.O=(l,t,r,n)=>{if(!t){var o=1/0;for(d=0;d<e.length;d++){t=e[d][0],r=e[d][1],n=e[d][2];for(var i=!0,c=0;c<t.length;c++)(!1&n||o>=n)&&Object.keys(a.O).every((e=>a.O[e](t[c])))?t.splice(c--,1):(i=!1,n<o&&(o=n));if(i){e.splice(d--,1);var s=r();void 0!==s&&(l=s)}}return l}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[t,r,n]},a.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),(()=>{var e={826:0,431:0};a.O.j=l=>0===e[l];var l=(l,t)=>{var r,n,o=t[0],i=t[1],c=t[2],s=0;if(o.some((l=>0!==e[l]))){for(r in i)a.o(i,r)&&(a.m[r]=i[r]);if(c)var d=c(a)}for(l&&l(t);s<o.length;s++)n=o[s],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(d)},t=self.webpackChunkmadeit_forms=self.webpackChunkmadeit_forms||[];t.forEach(l.bind(null,0)),t.push=l.bind(null,t.push.bind(t))})();var r=a.O(void 0,[431],(()=>a(233)));r=a.O(r)})();