"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["StorefrontFilterOptionsGroupOption-public"],{x0H9:function(e,t,n){n.r(t);var r=n("WZtd"),o=n("2MD/"),p=n("jAHd"),u=n.n(p),i=n("6LNs"),a=n("3mso"),s=n.n(a),c=n("16zp"),l=n("V+k2"),f=wp.element.lazy((function(){return n.e("StorefrontFilterOptionsGroup-public").then(n.bind(n,"y3xO"))})),d=wp.element.lazy((function(){return n.e("StorefrontFilterOptionsGroupItems-public").then(n.bind(n,"Eg2F"))}));t.default=function(e){var t=e.queryFn,n=e.groupType,p=e.heading,a=e.openOnLoad,b=void 0!==a&&a,h=e.filterName,m=void 0!==h&&h,y=e.noFilterGroupFoundText,F=wp.element,k=F.useState,w=F.useEffect,O=k(!0),x=(0,o.Z)(O,2),Z=x[0],v=x[1],g=k(!1),E=(0,o.Z)(g,2),G=E[0],L=E[1],T=k(!1),S=(0,o.Z)(T,2),z=S[0],H=S[1],C=k([]),I=(0,o.Z)(C,2),N=I[0],R=I[1],j=(0,l.v)();function q(e){return A.apply(this,arguments)}function A(){return(A=(0,r.Z)(u().mark((function e(n){var r,p,a,s,l,f;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(!z){e.next=5;break}return R(z),e.abrupt("return");case 5:return v(!0),e.next=8,(0,i.Z)(t(j));case 8:if(r=e.sent,p=(0,o.Z)(r,2),a=p[0],s=p[1],v(!1),!(l=(0,c.HL)(a,s,!1))){e.next=17;break}return L(l),e.abrupt("return");case 17:f=m?wp.hooks.applyFilters(m,s.data):s.data,H(f),R(f);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return w((function(){b&&q(b)}),[]),React.createElement(f,{onOpen:q,openOnLoad:b,error:G,isLoadingItems:Z,groupType:n,noFilterGroupFoundText:y,areFilterOptionsEmpty:s()(N),heading:p,items:React.createElement(d,{filterOptions:N,itemType:n})})}}}]);