(()=>{"use strict";var e,t={205:()=>{const e=window.wp.blocks,t=window.wp.element,l=window.wp.primitives,a=(0,t.createElement)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)(l.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),n=window.wp.i18n,r=window.lodash,o=window.wp.blockEditor,i=window.wp.components;(0,e.registerBlockType)("madeitforms/radio-value-field",{icon:a,edit:function(e){const{attributes:l,setAttributes:a,className:s,clientId:c}=e,{selected:d,name:m,id:u,label:v,value:p}=l;null==m&&a({name:"field-"+(0,r.uniqueId)()});const w=(0,o.useBlockProps)({className:s});wp.data.select("core/block-editor").getBlocks();var h=[];return h.push((0,t.createElement)("div",{className:"madeit-forms-single-radio-field"},(0,t.createElement)("input",{type:"radio",id:u,name:m,value:p,checked:d}),v)),[(0,t.createElement)(o.InspectorControls,null,(0,t.createElement)(i.PanelBody,{title:(0,n.__)("Field settings"),initialOpen:!0},(0,t.createElement)(i.TextControl,{label:(0,n.__)("Label"),value:v,onChange:e=>a({label:e})}),(0,t.createElement)(i.TextControl,{label:(0,n.__)("ID"),value:u,onChange:e=>a({id:e})}),(0,t.createElement)(i.ToggleControl,{label:(0,n.__)("Selected"),checked:d,onChange:e=>a({selected:e})}),(0,t.createElement)(i.TextControl,{label:(0,n.__)("Name"),help:(0,n.__)("Deze naam kan je gebruiken in de acties. Enkel letters, cijfers, - of _ zijn toegelaten."),value:m,onChange:e=>{e.toLowerCase().replace(/[^a-z0-9-_]/gi,""),a({name:e})}}),(0,t.createElement)(i.TextControl,{label:(0,n.__)("Value"),value:p,onChange:e=>a({value:e})}))),(0,t.createElement)("div",null,(0,t.createElement)("div",w,(0,t.createElement)("div",null,h)),!1)]},save:function(e){const{attributes:l,className:a,clientId:n}=e,{selected:r,name:i,id:s,label:c,value:d}=l,m=o.useBlockProps.save({className:a});var u=[];return u.push((0,t.createElement)("div",{className:"madeit-forms-single-radio-field"},(0,t.createElement)("label",null,(0,t.createElement)("input",{type:"radio",id:s,name:i,value:d,checked:r}),(0,t.createElement)("span",null,c)))),(0,t.createElement)("div",m,u)}})}},l={};function a(e){var n=l[e];if(void 0!==n)return n.exports;var r=l[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.m=t,e=[],a.O=(t,l,n,r)=>{if(!l){var o=1/0;for(d=0;d<e.length;d++){l=e[d][0],n=e[d][1],r=e[d][2];for(var i=!0,s=0;s<l.length;s++)(!1&r||o>=r)&&Object.keys(a.O).every((e=>a.O[e](l[s])))?l.splice(s--,1):(i=!1,r<o&&(o=r));if(i){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[l,n,r]},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={826:0,431:0};a.O.j=t=>0===e[t];var t=(t,l)=>{var n,r,o=l[0],i=l[1],s=l[2],c=0;if(o.some((t=>0!==e[t]))){for(n in i)a.o(i,n)&&(a.m[n]=i[n]);if(s)var d=s(a)}for(t&&t(l);c<o.length;c++)r=o[c],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(d)},l=self.webpackChunkmadeit_forms=self.webpackChunkmadeit_forms||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var n=a.O(void 0,[431],(()=>a(205)));n=a.O(n)})();