(()=>{"use strict";var e,r={659(){const e=window.wp.blocks,r=window.wp.components,o=window.wp.blockEditor,n=window.wp.i18n,a=window.ReactJSXRuntime,i=JSON.parse('{"UU":"pronamic/form-radio-field"}'),c=[["pronamic/form-radio-option"]];(0,e.registerBlockType)(i.UU,{icon:((e,o=24,n=24,i="0 0 24 24")=>(0,a.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:i,children:[(0,a.jsx)(r.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e]}))((0,a.jsx)(r.Path,{d:"M4 7.75C4 9.40685 5.34315 10.75 7 10.75C8.65685 10.75 10 9.40685 10 7.75C10 6.09315 8.65685 4.75 7 4.75C5.34315 4.75 4 6.09315 4 7.75ZM20 8.5H12V7H20V8.5ZM20 17H12V15.5H20V17ZM7 17.75C6.17157 17.75 5.5 17.0784 5.5 16.25C5.5 15.4216 6.17157 14.75 7 14.75C7.82843 14.75 8.5 15.4216 8.5 16.25C8.5 17.0784 7.82843 17.75 7 17.75ZM4 16.25C4 17.9069 5.34315 19.25 7 19.25C8.65685 19.25 10 17.9069 10 16.25C10 14.5931 8.65685 13.25 7 13.25C5.34315 13.25 4 14.5931 4 16.25Z"})),edit:({attributes:e,setAttributes:i})=>{const{required:s}=e,t=(0,o.useBlockProps)();return(0,a.jsxs)("div",{...t,children:[(0,a.jsx)(o.InspectorControls,{children:(0,a.jsx)(r.PanelBody,{title:(0,n.__)("Settings","pronamic-forms"),children:(0,a.jsx)(r.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Required","pronamic-forms"),help:(0,n.__)("Select this option to make the input required.","pronamic-forms"),checked:s,onChange:e=>{i({required:e})}})})}),(0,a.jsxs)(o.InspectorControls,{group:"advanced",children:[(0,a.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,n.__)("Name","pronamic-forms"),value:e.name,onChange:e=>{i({name:e})}}),(0,a.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,n.__)("Reference","pronamic-forms"),value:e.reference,onChange:e=>{i({reference:e})}})]}),(0,a.jsx)("div",{className:"wp-block-pronamic-form-label",children:(0,a.jsx)(o.RichText,{tagName:"span",value:e.label,onChange:e=>i({label:e}),placeholder:(0,n.__)("Enter label…","pronamic-forms")})}),(0,a.jsx)(o.InnerBlocks,{template:c})]})},save({attributes:e}){const r=o.useBlockProps.save({className:"wp-block-pronamic-form-field"});return(0,a.jsxs)("div",{...r,children:[(0,a.jsx)("div",{className:"wp-block-pronamic-form-label",children:(0,a.jsx)(o.RichText.Content,{tagName:"span",value:e.label})}),(0,a.jsx)("div",{className:"wp-block-pronamic-form-radio-field__inner-blocks",children:(0,a.jsx)(o.InnerBlocks.Content,{})})]})},transforms:{to:[{type:"block",blocks:["pronamic/form-field"],transform:r=>(0,e.createBlock)("pronamic/form-field",r)}]},variations:[{name:"pronamic-form-radio-field-subscription-frequency",title:(0,n.__)("Subscription frequency choice field","pronamic-forms"),keywords:[(0,n.__)("frequency","pronamic-forms"),(0,n.__)("interval","pronamic-forms"),(0,n.__)("recurrence","pronamic-forms"),(0,n.__)("subscription","pronamic-forms"),(0,n.__)("Once","pronamic-forms"),(0,n.__)("Monthly","pronamic-forms"),(0,n.__)("Yearly","pronamic-forms"),(0,n.__)("Annual","pronamic-forms")],attributes:{label:(0,n.__)("Frequency","pronamic-forms"),reference:"pronamic_pay_subscription_frequency",required:!0},innerBlocks:[["pronamic/form-radio-option",{label:(0,n.__)("Once","pronamic-forms"),reference:"pronamic_pay_subscription_frequency",value:"once"}],["pronamic/form-radio-option",{label:(0,n.__)("Monthly","pronamic-forms"),reference:"pronamic_pay_subscription_frequency",value:"monthly"}],["pronamic/form-radio-option",{label:(0,n.__)("Yearly","pronamic-forms"),reference:"pronamic_pay_subscription_frequency",value:"yearly"}]],example:{attributes:{label:(0,n.__)("Frequency","pronamic-forms")}},scope:["block","inserter","transform"],isActive:["reference"]}]})}},o={};function n(e){var a=o[e];if(void 0!==a)return a.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.m=r,e=[],n.O=(r,o,a,i)=>{if(!o){var c=1/0;for(m=0;m<e.length;m++){for(var[o,a,i]=e[m],s=!0,t=0;t<o.length;t++)(!1&i||c>=i)&&Object.keys(n.O).every(e=>n.O[e](o[t]))?o.splice(t--,1):(s=!1,i<c&&(c=i));if(s){e.splice(m--,1);var l=a();void 0!==l&&(r=l)}}return r}i=i||0;for(var m=e.length;m>0&&e[m-1][2]>i;m--)e[m]=e[m-1];e[m]=[o,a,i]},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={461:0,441:0};n.O.j=r=>0===e[r];var r=(r,o)=>{var a,i,[c,s,t]=o,l=0;if(c.some(r=>0!==e[r])){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);if(t)var m=t(n)}for(r&&r(o);l<c.length;l++)i=c[l],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(m)},o=globalThis.webpackChunkpronamic_pay=globalThis.webpackChunkpronamic_pay||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var a=n.O(void 0,[441],()=>n(659));a=n.O(a)})();