(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["StorefrontSelectionsWrapper-public"],{"KM+y":function(e,t,n){"use strict";n.d(t,{Lh:function(){return S},Sf:function(){return d},fo:function(){return y}});var r=n("6lrK"),i=n.n(r),l=n("Zmzl"),s=n.n(l),o=(n("wHO6"),n("3mso")),a=n.n(o),c=(n("kn62"),n("+s+W")),p=n.n(c),u=n("dGr1");function f(e){return e.isSelected?i()([e.selectedValue],e.currentList):s()((t=e.currentList)?t.map((function(e){return p()(e)?e.includes("gid://")?e:String(e).toLowerCase():e})):[],e.selectedValue);var t}function S(e){var t=Object.keys(e);return a()(t)||(0,u.z)(e)?[]:t}function d(e,t){var n={};return n[e]=t,n}function y(e,t,n,r){for(var i in r)i!==t&&a()(r[i])&&delete r[i];if("collections"===t)for(var l in r)"collections"!==l&&delete r[l];else for(var s in r)"collections"===s&&delete r[s];if(!e)return f({currentList:r[t]});if(p()(e))if(e.includes("gid://"))var o=e;else o=String(e).toLowerCase();else o=e;return f({isSelected:n,currentList:r[t],selectedValue:o})}},U1tp:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return T}});var r=n("LpH3"),i=n("Qu7M"),l=n("fYWZ"),s={name:"1o6q2bz-clearAllCSS",styles:"text-decoration:underline;font-size:14px;margin-left:4px;margin-top:0px;position:relative;top:-2px;&:hover{opacity:0.8;cursor:pointer;};label:clearAllCSS;"};function o(){var e=(0,i.Q)(),t=(0,i.O)(),n=(0,l.D)(),o=s;return(0,r.tZ)("div",{className:"wps-filter-selections-clear",onClick:function(){n({type:"CLEAR_SELECTIONS"}),t({type:"SET_QUERY_TYPE",payload:"products"}),t({type:"SET_QUERY_PARAMS",payload:e.originalParams}),t({type:"SET_IS_FETCHING_NEW",payload:!0}),t({type:"SET_HAS_STOREFRONT_SELECTIONS",payload:!1}),t({type:"SET_SEARCH_QUERY",payload:!1})},css:o},e.settings.clearFilterSelectionsText)}var a=n("Ktwk"),c=n("KM+y"),p=n("+s+W"),u=n.n(p),f={name:"1h4ju16-selectionValueCSS",styles:"margin-right:8px;margin-bottom:10px;text-transform:capitalize;padding:5px 9px 5px 12px;background:transparent;font-size:14px;position:relative;display:flex;align-items:center;border:1px solid silver;border-radius:4px;&:hover{cursor:pointer;opacity:0.8;}.wps-icon{width:7px;height:7px;display:inline-block;right:2px;position:relative;top:0;margin-left:10px;}.wps-icon svg{width:7px;height:7px;display:inline-block;position:relative;position:absolute;top:0;};label:selectionValueCSS;"};function S(e){var t=e.selectionType,n=e.val,s=(0,l.f)(),o=(0,l.D)(),p=(0,i.Q)(),S=f;return(0,r.tZ)("span",{className:"wps-filter-selection-value wps-mr-2",onClick:function(e){var r=(0,c.fo)(n,t,!1,s.selections),i=(0,c.Sf)(t,r);o({type:"SET_SELECTIONS",payload:i}),o({type:"SET_SELECTED_"+String(t).toUpperCase(),payload:r})},css:S},"available_for_sale"===t?p.settings.selectionsAvailableForSaleText:u()(n)?n:n.label,(0,r.tZ)(a.H,null))}function d(e){var t=e.selectionType;return e.vals.map((function(e){return e?(0,r.tZ)(S,{key:u()(e)?e:e.id,selectionType:t,val:e}):null}))}var y=n("3mso"),v=n.n(y),x={name:"1q53ro7-filterSelectionGroupCSS",styles:"display:flex;flex-wrap:wrap;label:filterSelectionGroupCSS;"},m={name:"rrtgqc-filterSelectionTypeCSS",styles:"margin-bottom:10px;label:filterSelectionTypeCSS;"};function g(e){var t=e.selectionType,n=(0,l.f)(),i=m,s=x;return v()(n.selections[t])?null:(0,r.tZ)("div",{className:"wps-filter-selection-type",css:i},(0,r.tZ)("div",{className:"wps-selections-group align-items-center",css:s},(0,r.tZ)(d,{selectionType:t,vals:n.selections[t]})))}function w(e){var t=e.selections;return(0,c.Lh)(t).map((function(e,t){return(0,r.tZ)(g,{key:t,selectionType:e})}))}var E={name:"fihllr-StorefrontSelectionsWrapperCSS",styles:"display:flex;flex-direction:row;align-items:baseline;flex-wrap:wrap;label:StorefrontSelectionsWrapperCSS;"},T=function(e){var t=e.selections,n=E;return(0,r.tZ)("div",{className:"wps-filter-selections",css:n},(0,r.tZ)(w,{selections:t}),(0,r.tZ)(o,null))}},wHO6:function(e,t,n){var r=n("njL+"),i=n("4Dcw"),l=n("aDkP"),s=n("aY3D"),o=l((function(e,t){return s(e)?r(e,i(t,1,s,!0)):[]}));e.exports=o},"6lrK":function(e,t,n){var r=n("4Dcw"),i=n("aDkP"),l=n("syN9"),s=n("aY3D"),o=i((function(e){return l(r(e,1,s,!0))}));e.exports=o}}]);