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;(0,t.store)("woocommerce/product-filter-attribute",{actions:{toggleFilter:()=>{var e;const{ref:r}=(0,t.getElement)(),i=null!==(e=r.getAttribute("data-attribute-value"))&&void 0!==e?e:"value",o=r.getAttribute(i);if(!o)return;const{attributeSlug:a,queryType:l}=(0,t.getContext)(),c=(0,t.getContext)("woocommerce/product-filters");if(!(`filter_${a}`in c.params))return void(c.params={...c.params,[`filter_${a}`]:o,[`query_type_${a}`]:l});const n=c.params[`filter_${a}`].split(",");if(n.includes(o)){const e=n.filter((e=>e!==o));if(e.length>0)c.params[`filter_${a}`]=e.join(",");else{const e=c.params;delete e[`filter_${a}`],delete e[`query_type_${a}`],c.params=e}}else c.params[`filter_${a}`]=n.concat(o).join(",")},clearFilters:()=>{const{attributeSlug:e}=(0,t.getContext)(),r=(0,t.getContext)("woocommerce/product-filters"),i=r.params;delete i[`filter_${e}`],delete i[`query_type_${e}`],r.params=i}}}),(wc=void 0===wc?{}:wc)["product-filter-attribute"]=e})();