(()=>{"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"}'),l=[["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:c}=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-ideal"),children:(0,a.jsx)(r.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Required","pronamic-ideal"),help:(0,n.__)("Select this option to make the input required.","pronamic-ideal"),checked:c,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-ideal"),value:e.name,onChange:e=>{i({name:e})}}),(0,a.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,n.__)("Reference","pronamic-ideal"),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-ideal")})}),(0,a.jsx)(o.InnerBlocks,{template:l})]})},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-ideal"),keywords:[(0,n.__)("frequency","pronamic-ideal"),(0,n.__)("interval","pronamic-ideal"),(0,n.__)("recurrence","pronamic-ideal"),(0,n.__)("subscription","pronamic-ideal"),(0,n.__)("Once","pronamic-ideal"),(0,n.__)("Monthly","pronamic-ideal"),(0,n.__)("Yearly","pronamic-ideal"),(0,n.__)("Annual","pronamic-ideal")],attributes:{label:(0,n.__)("Frequency","pronamic-ideal"),reference:"pronamic_pay_subscription_frequency",required:!0},innerBlocks:[["pronamic/form-radio-option",{label:(0,n.__)("Once","pronamic-ideal"),reference:"pronamic_pay_subscription_frequency",value:"once"}],["pronamic/form-radio-option",{label:(0,n.__)("Monthly","pronamic-ideal"),reference:"pronamic_pay_subscription_frequency",value:"monthly"}],["pronamic/form-radio-option",{label:(0,n.__)("Yearly","pronamic-ideal"),reference:"pronamic_pay_subscription_frequency",value:"yearly"}]],example:{attributes:{label:(0,n.__)("Frequency","pronamic-ideal")}},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 l=1/0;for(p=0;p<e.length;p++){for(var[o,a,i]=e[p],c=!0,t=0;t<o.length;t++)(!1&i||l>=i)&&Object.keys(n.O).every(e=>n.O[e](o[t]))?o.splice(t--,1):(c=!1,i<l&&(l=i));if(c){e.splice(p--,1);var s=a();void 0!==s&&(r=s)}}return r}i=i||0;for(var p=e.length;p>0&&e[p-1][2]>i;p--)e[p]=e[p-1];e[p]=[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,[l,c,t]=o,s=0;if(l.some(r=>0!==e[r])){for(a in c)n.o(c,a)&&(n.m[a]=c[a]);if(t)var p=t(n)}for(r&&r(o);s<l.length;s++)i=l[s],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(p)},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)})();