(this["webpackJsonp6th-street"]=this["webpackJsonp6th-street"]||[]).push([[46],{2932:function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"BreadcrumbsDispatcher",(function(){return B})),n.d(t,"mapDispatchToProps",(function(){return E}));var r=n(5),a=n.n(r),u=n(12),c=n(10),o=n(3),i=n(4),s=n(7),l=n(6),p=n(0),d=n.n(p),f=n(16),b=n(11),h=n(17),v=n(58),m=n(42),O=n(187),g=n(506),j=n(1876),S=n(98),y=n(493),k=n(431),P=n(429),A=n(85),B=n.e(58).then(n.bind(null,1323)),x=n(15).checkBEMProps,C=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).state={hasError:!1},r}return Object(i.a)(n,[{key:"componentDidCatch",value:function(e,t){console.error("StrapiPage dynamic content failed to render",{error:e,info:t})}},{key:"render",value:function(){var e=this.state.hasError,t=this.props.children;return e?x(d.a,P.default,null):t}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),n}(d.a.Component),E=function(e){return{updateBreadcrumbs:function(t){return B.then((function(n){return n.default.update(t,e)}))},setMeta:function(t){return e(Object(O.b)(t))}}};t.default=Object(f.b)(null,E)((function(t){var n,r=t.location.pathname,o=Object(f.d)((function(e){return e.AppState.gender})),i=Object(f.d)((function(e){return e.AppState.language})),s=Object(f.d)((function(e){return e.AppState.country})),l=Object(f.d)((function(e){return e.MyAccountReducer.customer})),O=Object(f.d)((function(e){return e.AppConfig.abTestingConfig})),B=(null===l||void 0===l?void 0:l.user_segment)?l.user_segment:null===O||void 0===O||null===(n=O.HPP)||void 0===n?void 0:n.defaultUserSegment,E=Object(p.useState)(!0),M=Object(c.a)(E,2),I=M[0],w=M[1],D=Object(p.useState)([]),T=Object(c.a)(D,2),_=T[0],H=T[1],J=Object(p.useState)(!1),L=Object(c.a)(J,2),N=L[0],W=L[1],F=function(){W(!1)},G=function(){var e=r.replace(".html",""),t=e.split("?")[0].split("&idx=")[0].split("/").filter(Boolean).pop()||"",n={};return n.url=e||"/",n.BreadcrumbsName=Object(b.h)()?t:Object(v.a)(t).split(/(?:_|-)+/).join(" "),n},K=function(){var e=Object(u.a)(a.a.mark((function e(){var t,n,r,u,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=G(),n=t.url,r=void 0===n?"":n){e.next=5;break}return H([]),w(!1),e.abrupt("return");case 5:return e.prev=5,w(!0),e.next=9,g.a.getWidgets({url:r,locale:i,region:s,channel:h.a.any()&&!h.a.tablet()?"ms":"dt",userSegment:B});case 9:return u=e.sent,e.next=12,Object(j.a)(null===u||void 0===u?void 0:u.data);case 12:c=e.sent,H(Array.isArray(c)?c:[]),w(!1),e.next=22;break;case 17:e.prev=17,e.t0=e.catch(5),console.log(e.t0),H([]),w(!1);case 22:case"end":return e.stop()}}),e,null,[[5,17]])})));return function(){return e.apply(this,arguments)}}();return Object(p.useEffect)((function(){K(),function(){var n=t.updateBreadcrumbs,r=t.setMeta,a=G().BreadcrumbsName,u=[{url:"/",name:e("".concat(a))},{url:"/",name:e("\u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629")}];r({title:a||"Shop Online at AIVI for Men, Women & Kids Across the GCC"}),n(u)}()}),[r,i,s]),I?x(d.a,A.a,{isLoading:I}):I||(null===_||void 0===_?void 0:_.length)>0?x(d.a,"main",{block:"StrapiPage"},x(d.a,y.a,{label:e("StrapiPage")},N&&x(d.a,S.a,{closePopup:F,onSignIn:F,isPopup:!0}),!I&&(null===_||void 0===_?void 0:_.length)>0&&x(d.a,C,null,x(d.a,k.a,{gender:o,content:_,setLastTapItemOnHome:function(e){Object(m.t)(e)},renderMySignInPopup:function(){W(!0)}})))):x(d.a,P.default,null)}))}.call(this,n(28))}}]);