(()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,n=window.wp.blockEditor,t=window.wp.serverSideRender;var l=e.n(t);const s=window.wp.components,a=JSON.parse('{"UU":"ggmc/cart-display"}'),r=window.ReactJSXRuntime;(0,o.registerBlockType)(a.UU,{edit:({attributes:e,setAttributes:o})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.InspectorControls,{children:(0,r.jsxs)(s.PanelBody,{title:"Cart Settings",children:[(0,r.jsx)(s.ToggleControl,{label:"Show Empty Cart Message",checked:"yes"===e.showEmptyMessage,onChange:e=>o({showEmptyMessage:e?"yes":""})}),"yes"===e.showEmptyMessage&&(0,r.jsx)(s.TextControl,{label:"Empty Cart Message",value:e.emptyMessage,onChange:e=>o({emptyMessage:e})}),(0,r.jsx)(s.ToggleControl,{label:"Show Continue Shopping Button",checked:"yes"===e.showContinueShopping,onChange:e=>o({showContinueShopping:e?"yes":""})}),"yes"===e.showContinueShopping&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.TextControl,{label:"Continue Shopping Text",value:e.continueShoppingText,onChange:e=>o({continueShoppingText:e})}),(0,r.jsx)(s.TextControl,{label:"Continue Shopping URL",value:e.continueShoppingUrl,onChange:e=>o({continueShoppingUrl:e})})]}),(0,r.jsx)(s.TextControl,{label:"Checkout URL",value:e.checkoutUrl,onChange:e=>o({checkoutUrl:e})}),(0,r.jsx)(s.SelectControl,{label:"Quantity Controls Style",value:e.quantityControlsStyle,options:[{label:"Input Controls & Buttons",value:"both"},{label:"Input Controls Only",value:"input_only"}],onChange:e=>o({quantityControlsStyle:e})}),(0,r.jsx)(s.ToggleControl,{label:"Show Product Images",checked:"yes"===e.showProductImages,onChange:e=>o({showProductImages:e?"yes":""})}),(0,r.jsx)(s.ToggleControl,{label:"Link Product Name",checked:"yes"===e.linkProductName,onChange:e=>o({linkProductName:e?"yes":""})}),(0,r.jsx)(s.ToggleControl,{label:"Enable AJAX Updates",checked:"yes"===e.enableAjaxUpdates,onChange:e=>o({enableAjaxUpdates:e?"yes":""})})]})}),(0,r.jsx)(l(),{block:a.UU,attributes:e})]}),save:()=>null})})();