(()=>{"use strict";var e={n:l=>{var o=l&&l.__esModule?()=>l.default:()=>l;return e.d(o,{a:o}),o},d:(l,o)=>{for(var t in o)e.o(o,t)&&!e.o(l,t)&&Object.defineProperty(l,t,{enumerable:!0,get:o[t]})},o:(e,l)=>Object.prototype.hasOwnProperty.call(e,l)};const l=window.wp.blocks,o=window.wp.blockEditor,t=window.wp.serverSideRender;var a=e.n(t);const n=window.wp.components,r=JSON.parse('{"UU":"ggmc/taxonomy-header"}'),s=window.ReactJSXRuntime;(0,l.registerBlockType)(r.UU,{edit:({attributes:e,setAttributes:l})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.InspectorControls,{children:(0,s.jsxs)(n.PanelBody,{title:"Content",children:[(0,s.jsx)(n.SelectControl,{label:"Taxonomy Type",value:e.taxonomy_type,options:[{label:"Auto-detect from URL",value:"auto"},{label:"Category",value:"category"},{label:"Tag",value:"tag"}],onChange:e=>l({taxonomy_type:e})}),(0,s.jsx)(n.ToggleControl,{label:"Show Image",help:"Only available for categories with uploaded images",checked:"yes"===e.show_image,onChange:e=>l({show_image:e?"yes":"no"})}),(0,s.jsx)(n.ToggleControl,{label:"Show Title",checked:"yes"===e.show_title,onChange:e=>l({show_title:e?"yes":"no"})}),"yes"===e.show_title&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.TextControl,{label:"Title Prefix",value:e.title_prefix,onChange:e=>l({title_prefix:e}),placeholder:'e.g., "Category: " or "Browse "'}),(0,s.jsx)(n.SelectControl,{label:"Title HTML Tag",value:e.title_tag,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"div",value:"div"},{label:"span",value:"span"},{label:"p",value:"p"}],onChange:e=>l({title_tag:e})})]}),(0,s.jsx)(n.ToggleControl,{label:"Show Description",checked:"yes"===e.show_description,onChange:e=>l({show_description:e?"yes":"no"})}),(0,s.jsx)(n.ToggleControl,{label:"Show Product Count",checked:"yes"===e.show_product_count,onChange:e=>l({show_product_count:e?"yes":"no"})}),"yes"===e.show_product_count&&(0,s.jsx)(n.TextControl,{label:"Product Count Format",help:"Use {count} as placeholder for the number",value:e.product_count_format,onChange:e=>l({product_count_format:e})}),(0,s.jsx)(n.SelectControl,{label:"Alignment",value:e.alignment,options:[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],onChange:e=>l({alignment:e})})]})}),(0,s.jsx)(a(),{block:r.UU,attributes:e})]}),save:()=>null})})();