(()=>{"use strict";var e={n:o=>{var l=o&&o.__esModule?()=>o.default:()=>o;return e.d(l,{a:l}),l},d:(o,l)=>{for(var t in l)e.o(l,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:l[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,l=window.wp.blockEditor,t=window.wp.serverSideRender;var a=e.n(t);const n=window.wp.components,s=JSON.parse('{"UU":"ggmc/recently-viewed"}'),r=window.ReactJSXRuntime;(0,o.registerBlockType)(s.UU,{edit:({attributes:e,setAttributes:o})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.InspectorControls,{children:(0,r.jsxs)(n.PanelBody,{title:"Content",children:[(0,r.jsx)(n.TextControl,{label:"Section Title",value:e.title,onChange:e=>o({title:e})}),(0,r.jsx)(n.ToggleControl,{label:"Show Title",checked:"yes"===e.showTitle,onChange:e=>o({showTitle:e?"yes":""})}),(0,r.jsx)(n.__experimentalNumberControl,{label:"Max Products",value:e.maxProducts,min:1,max:12,onChange:e=>o({maxProducts:parseInt(e)||4})}),(0,r.jsx)(n.SelectControl,{label:"Columns",value:e.columns,options:[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"},{label:"6",value:"6"}],onChange:e=>o({columns:e})}),(0,r.jsx)(n.ToggleControl,{label:"Show Image",checked:"yes"===e.showImage,onChange:e=>o({showImage:e?"yes":""})}),(0,r.jsx)(n.ToggleControl,{label:"Show Price",checked:"yes"===e.showPrice,onChange:e=>o({showPrice:e?"yes":""})}),(0,r.jsx)(n.ToggleControl,{label:"Exclude Current Product",checked:"yes"===e.excludeCurrent,onChange:e=>o({excludeCurrent:e?"yes":""})}),(0,r.jsx)(n.ToggleControl,{label:"Show Add to Cart",checked:"yes"===e.showAddToCart,onChange:e=>o({showAddToCart:e?"yes":""})}),"yes"===e.showAddToCart&&(0,r.jsx)(n.TextControl,{label:"Button Text",value:e.addToCartText,onChange:e=>o({addToCartText:e})}),(0,r.jsx)(n.TextControl,{label:"Empty Message",value:e.emptyMessage,onChange:e=>o({emptyMessage:e})})]})}),(0,r.jsx)(a(),{block:s.UU,attributes:e})]}),save:()=>null})})();