(()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,t=window.wp.blockEditor,n=window.wp.serverSideRender;var s=e.n(n);const l=window.wp.components,a=JSON.parse('{"UU":"ggmc/applied-discount"}'),r=window.ReactJSXRuntime;(0,o.registerBlockType)(a.UU,{edit:({attributes:e,setAttributes:o})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.InspectorControls,{children:(0,r.jsxs)(l.PanelBody,{title:"Content",children:[(0,r.jsx)(l.ToggleControl,{label:"Show Discount Code",checked:"yes"===e.show_code,onChange:e=>o({show_code:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Show Discount Amount",checked:"yes"===e.show_amount,onChange:e=>o({show_amount:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Show Remove Button",checked:"yes"===e.show_remove_button,onChange:e=>o({show_remove_button:e?"yes":""})}),(0,r.jsx)(l.TextControl,{label:"Empty State Text",value:e.empty_message,onChange:e=>o({empty_message:e}),help:"Text to show when no discount is applied (leave empty to hide widget)"}),(0,r.jsx)(l.TextControl,{label:"Discount Label",value:e.discount_label,onChange:e=>o({discount_label:e})})]})}),(0,r.jsx)(s(),{block:a.UU,attributes:e})]}),save:()=>null})})();