(()=>{"use strict";const t=window.wp.blocks,e=JSON.parse('{"apiVersion":3,"name":"cgc/gift-card-submit-button","title":"Gift Card Submit Button","category":"widgets","icon":"button","description":"The call-to-action button that submits the gift card form.","textdomain":"gift-card-studio","parent":["cgc/gift-card-form"],"supports":{"html":false,"reusable":false},"attributes":{"text":{"type":"string","default":"Continue to Payment"},"loadingText":{"type":"string","default":"Processing…"}},"editorScript":"file:./index.js","editorStyle":"file:../gift-card-submit-button.css"}'),i=window.ReactJSXRuntime,o=window.wp.blockEditor,n=window.wp.components,s=window.wp.i18n;(0,t.registerBlockType)(e.name,Object.assign(Object.assign({},e),{edit:function({attributes:t,setAttributes:e}){const{text:a,loadingText:r}=t,c=(0,o.useBlockProps)();return(0,i.jsxs)("div",Object.assign({},c,{children:[(0,i.jsx)(o.InspectorControls,{children:(0,i.jsx)(n.PanelBody,{title:(0,s.__)("Submit Button","gift-card-studio"),children:(0,i.jsx)(n.TextControl,{label:(0,s.__)("Loading Label","gift-card-studio"),help:(0,s.__)("Shown on the button in place of its normal text while the form is submitting.","gift-card-studio"),value:r,onChange:t=>e({loadingText:t})})})}),(0,i.jsx)(o.RichText,{tagName:"span",className:"cgc-submit-button-preview",value:a,onChange:t=>e({text:t}),placeholder:(0,s.__)("Continue to Payment","gift-card-studio"),allowedFormats:[]})]}))},save:()=>null}))})();