var wc;(()=>{"use strict";var e={};(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);const t=window.wc.__experimentalInteractivity,{state:r,actions:s}=(0,t.store)("woocommerce/product-filter-status",{state:{get selectedFilters(){return((0,t.store)("woocommerce/product-filters").state.activeFilters||[]).filter((e=>"status"===e.type)).map((e=>e.value)).filter(Boolean)},get hasSelectedFilters(){return r.selectedFilters.length>0},get isItemSelected(){const{props:e}=(0,t.getElement)();return!!e.value&&r.selectedFilters.includes(e.value)}},actions:{getActiveLabel(e){const{activeLabelTemplate:r}=(0,t.getContext)();return r.replace("{{label}}",e)},toggleFilter:()=>{const{props:e}=(0,t.getElement)();let l=e["data-filter-item"];"string"==typeof l&&(l=JSON.parse(l));const{ariaLabel:o,value:c}=l;if(!c||!o)return;const i=(0,t.store)("woocommerce/product-filters");r.selectedFilters.includes(c)?i.actions.removeActiveFilter("status",c):i.actions.setActiveFilter({type:"status",value:c,label:s.getActiveLabel(o)}),i.actions.navigate()},clearFilters:()=>{const e=(0,t.store)("woocommerce/product-filters");e.actions.removeActiveFiltersByType("status"),e.actions.navigate()}}});(wc=void 0===wc?{}:wc)["product-filter-status"]=e})();