(()=>{"use strict";var e={n:o=>{var s=o&&o.__esModule?()=>o.default:()=>o;return e.d(s,{a:s}),s},d:(o,s)=>{for(var t in s)e.o(s,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:s[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,s=window.wp.blockEditor,t=window.wp.serverSideRender;var n=e.n(t);const l=window.wp.components,a=JSON.parse('{"UU":"ggmc/product-comparison"}'),r=window.ReactJSXRuntime;(0,o.registerBlockType)(a.UU,{edit:({attributes:e,setAttributes:o})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.InspectorControls,{children:[(0,r.jsxs)(l.PanelBody,{title:"Content",children:[(0,r.jsx)(l.TextControl,{label:"Section Title",value:e.title,onChange:e=>o({title:e})}),(0,r.jsx)(l.ToggleControl,{label:"Show Title",checked:"yes"===e.showTitle,onChange:e=>o({showTitle:e?"yes":""})}),(0,r.jsx)(l.TextareaControl,{label:"Empty Message",value:e.emptyMessage,onChange:e=>o({emptyMessage:e})}),(0,r.jsx)(l.ToggleControl,{label:"Show Add Products CTA",checked:"yes"===e.showAddProductsCta,onChange:e=>o({showAddProductsCta:e?"yes":""})}),"yes"===e.showAddProductsCta&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.TextControl,{label:"Shop Page URL",value:e.addProductsUrl,onChange:e=>o({addProductsUrl:e})}),(0,r.jsx)(l.TextControl,{label:"Add Products Button Text",value:e.addProductsText,onChange:e=>o({addProductsText:e})})]})]}),(0,r.jsxs)(l.PanelBody,{title:"Comparison Fields",initialOpen:!1,children:[(0,r.jsx)(l.ToggleControl,{label:"Product Image",checked:"yes"===e.showImage,onChange:e=>o({showImage:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Product Name",checked:"yes"===e.showName,onChange:e=>o({showName:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Price",checked:"yes"===e.showPrice,onChange:e=>o({showPrice:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Stock Status",checked:"yes"===e.showStock,onChange:e=>o({showStock:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"SKU",checked:"yes"===e.showSku,onChange:e=>o({showSku:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Short Description",checked:"yes"===e.showDescription,onChange:e=>o({showDescription:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Categories",checked:"yes"===e.showCategories,onChange:e=>o({showCategories:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Tags",checked:"yes"===e.showTags,onChange:e=>o({showTags:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Rating",checked:"yes"===e.showRating,onChange:e=>o({showRating:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Weight",checked:"yes"===e.showWeight,onChange:e=>o({showWeight:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Dimensions",checked:"yes"===e.showDimensions,onChange:e=>o({showDimensions:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Add to Cart Button",checked:"yes"===e.showAddToCart,onChange:e=>o({showAddToCart:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Custom Attributes",checked:"yes"===e.showCustomAttributes,onChange:e=>o({showCustomAttributes:e?"yes":""})}),"yes"===e.showCustomAttributes&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.ToggleControl,{label:"Show Attribute Icons",checked:"yes"===e.showAttributeIcon,onChange:e=>o({showAttributeIcon:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Show Attribute Units",checked:"yes"===e.showAttributeUnit,onChange:e=>o({showAttributeUnit:e?"yes":""})})]}),(0,r.jsx)(l.ToggleControl,{label:"Barcode",checked:"yes"===e.showBarcode,onChange:e=>o({showBarcode:e?"yes":""})}),(0,r.jsx)(l.ToggleControl,{label:"Kit Contents",checked:"yes"===e.showKitContents,onChange:e=>o({showKitContents:e?"yes":""})})]})]}),(0,r.jsx)(n(),{block:a.UU,attributes:e})]}),save:()=>null})})();