(()=>{"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 s=e.n(t);const a=window.wp.components,n=JSON.parse('{"UU":"ggmc/wishlist"}'),i=window.ReactJSXRuntime;(0,o.registerBlockType)(n.UU,{edit:({attributes:e,setAttributes:o})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.InspectorControls,{children:(0,i.jsxs)(a.PanelBody,{title:"Content",children:[(0,i.jsx)(a.SelectControl,{label:"Display Mode",value:e.wishlistMode,options:[{label:"Default Wishlist",value:"default"},{label:"Specific Wishlist",value:"specific"},{label:"All Wishlists (Tabbed)",value:"all"},{label:"Dropdown Selector",value:"dropdown"}],onChange:e=>o({wishlistMode:e})}),"specific"===e.wishlistMode&&(0,i.jsx)(a.TextControl,{label:"Wishlist ID",value:e.wishlistId,onChange:e=>o({wishlistId:e}),help:"Enter a wishlist ID to display, or leave empty to auto-detect."}),("all"===e.wishlistMode||"dropdown"===e.wishlistMode)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.ToggleControl,{label:"Show Management Controls",checked:"yes"===e.showManagement,onChange:e=>o({showManagement:e?"yes":""})}),(0,i.jsx)(a.ToggleControl,{label:"Show Move/Copy Options",checked:"yes"===e.showMoveCopy,onChange:e=>o({showMoveCopy:e?"yes":""})})]}),(0,i.jsx)(a.ToggleControl,{label:"Show Share Button",checked:"yes"===e.showSharing,onChange:e=>o({showSharing:e?"yes":""})}),(0,i.jsx)(a.ToggleControl,{label:"Show Title",checked:"yes"===e.showTitle,onChange:e=>o({showTitle:e?"yes":""})}),"yes"===e.showTitle&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.SelectControl,{label:"Title Source",value:e.titleSource,options:[{label:"Wishlist Name",value:"wishlist_name"},{label:"Custom Text",value:"custom"}],onChange:e=>o({titleSource:e})}),"custom"===e.titleSource&&(0,i.jsx)(a.TextControl,{label:"Custom Title",value:e.title,onChange:e=>o({title:e})})]}),(0,i.jsx)(a.TextareaControl,{label:"Empty Wishlist Message",value:e.emptyMessage,onChange:e=>o({emptyMessage:e})}),(0,i.jsx)(a.ToggleControl,{label:"Show Remove Button",checked:"yes"===e.showRemoveButton,onChange:e=>o({showRemoveButton:e?"yes":""})}),(0,i.jsx)(a.ToggleControl,{label:"Show Add to Cart Button",checked:"yes"===e.showAddToCart,onChange:e=>o({showAddToCart:e?"yes":""})}),(0,i.jsx)(a.ToggleControl,{label:"Show Clear All Button",checked:"yes"===e.showClearAll,onChange:e=>o({showClearAll:e?"yes":""})})]})}),(0,i.jsx)(s(),{block:n.UU,attributes:e})]}),save:()=>null})})();