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