import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const o=(l={getConfig:()=>e.getConfig,getContext:()=>e.getContext,store:()=>e.store},i={},t.d(i,l),i),r={state:{get removableItems(){const{activeFilters:e}=(0,o.getContext)();return e.filter(e=>!!e.value).map(e=>({id:e.type+"_"+e.value,type:e.type,value:e.value,label:e.activeLabel}))},get removeItemLabel(){const{item:e}=(0,o.getContext)(),{removeLabelTemplate:t}=(0,o.getConfig)(),r="string"==typeof t?t:"{{label}}",a="string"==typeof e?.label?e.label:"";return r.replace("{{label}}",a)},get hasActiveFilters(){const{activeFilters:e}=(0,o.getContext)();return e.length>0}},actions:{removeAll:()=>{(0,o.getContext)().activeFilters=[],a.navigate()},remove:()=>{const{item:e}=(0,o.getContext)();a.removeActiveFiltersBy(t=>t.value===e.value&&t.type===e.type),a.navigate()}}},{actions:a}=(0,o.store)("woocommerce/product-filters",r);var l,i;