(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6366],{82543:function(e,t,n){"use strict";var l=n(2265),o=n(41448),i=n.n(o),r=n(87937);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c=["className","cssModule","tag","innerRef"];function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(this,arguments)}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f={children:i().node,tag:r.iC,innerRef:i().oneOfType([i().object,i().func,i().string]),className:i().string,cssModule:i().object},h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(i,e);var t,n,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=v(i);return e=t?Reflect.construct(n,arguments,v(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return u(e)}(this,e)});function i(e){var t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).getRef=t.getRef.bind(u(t)),t.submit=t.submit.bind(u(t)),t}return n=[{key:"getRef",value:function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e}},{key:"submit",value:function(){this.ref&&this.ref.submit()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cssModule,o=e.tag,i=e.innerRef,s=function(e,t){if(null==e)return{};var n,l,o=function(e,t){if(null==e)return{};var n,l,o={},i=Object.keys(e);for(l=0;l<i.length;l++)n=i[l],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)n=i[l],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,c),d=(0,r.mx)(t,n);return l.createElement(void 0===o?"form":o,a({},s,{ref:i,className:d}))}}],function(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i}(l.Component);h.propTypes=f,t.Z=h},96366:function(e,t,n){"use strict";n.d(t,{default:function(){return G}});var l=n(57437),o=n(2265),i=n(45596),r=n(2420);n(78579);var s=n(63939),c=n(24452),a=n(51501),d=n(21229),u=n(56750),v=n(14994),f=n(66648),h=n(73511),m=n(87138),b=n(52302),x=n(2917),p=e=>{var t;let{elem:n}=e,{i18Lang:i}=(0,o.useContext)(b.Z),{t:r}=(0,x.$)(i,"common");return(null==n?void 0:n.slug)?"/".concat(i,"/shop?category=").concat(n.slug):"/".concat(i,"/collections?category=").concat(n.slug),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"shop-category-box border-0",children:[(0,l.jsx)(m.default,{href:"/".concat(i,"/collections?category=").concat(null==n?void 0:n.slug),className:"circle-1",children:(0,l.jsx)(f.default,{src:"".concat(a.Ll,"/").concat(null==n?void 0:null===(t=n.category_image)||void 0===t?void 0:t.original_url)||h.b,className:"img-fluid",alt:null==n?void 0:n.name,width:106,height:90})}),(0,l.jsx)("div",{className:"category-name",children:(0,l.jsx)("h6",{children:null==n?void 0:n.name})})]})})},j=n(80443),g=n(43153),y=n(30458);n(9051),n(55291);var _=e=>{let{dataAPI:t}=e,{filterCategory:n}=(0,o.useContext)(y.Z);return(0,o.useMemo)(()=>{var e;return(null==t?void 0:t.length)>0?null===(e=n("product"))||void 0===e?void 0:e.filter(e=>null==t?void 0:t.includes(e._id)):n("product")},[n("product")]),(0,l.jsxs)(i.Z,{classes:{sectionClass:"category-section-2"},noRowCol:!0,children:[(0,l.jsx)(v.Z,{title:null==t?void 0:t.title}),(0,l.jsx)(d.Z,{children:(0,l.jsx)(u.Z,{xs:12,children:(0,l.jsx)("div",{className:"category-slider arrow-slider",children:(0,l.jsx)(g.Z,{...j.ln,children:null==t?void 0:t.map((e,t)=>(0,l.jsx)(p,{elem:e},t))})})})})]})},Z=e=>{var t;let{dataAPI:n}=e;return(0,l.jsxs)(i.Z,{noRowCol:!0,children:[(0,l.jsx)(v.Z,{title:null==n?void 0:n.title}),(0,l.jsx)(d.Z,{children:(0,l.jsx)(u.Z,{xs:12,children:(0,l.jsx)("div",{className:"no-arrow",children:(0,l.jsx)(g.Z,{...j.Gz,children:null==n?void 0:null===(t=n.banners)||void 0===t?void 0:t.map((e,t)=>(0,l.jsx)("div",{className:"three-slider arrow-slider ratio_58",children:(0,l.jsx)(r.Z,{classes:{customHoverClass:"offer-banner hover-effect"},imgUrl:null==e?void 0:e.image_url,ratioImage:!0,elem:e})},t))})})})})]})},C=n(51130),w=e=>{let{filterCategoryData:t,setActiveTab:n,activeTab:i}=e;return(0,o.useEffect)(()=>{null==t||t.length},[]),(0,l.jsx)(v.Z,{title:"OurProducts",customClass:"title-flex-2 title",children:(0,l.jsx)(C.Z,{classes:{navClass:"nav-tabs tab-style-color-2 tab-style-color"},setActiveTab:n,activeTab:i,titleList:[...t]})})},O=n(64522),P=n(70188),N=n(90725),R=n(76319),S=e=>{let{activeTab:t,filterCategoryData:n}=e,{productData:i}=(0,o.useContext)(R.Z),[r,s]=(0,o.useState)([]);return(0,o.useEffect)(()=>{var e;(null==i?void 0:null===(e=i.data)||void 0===e?void 0:e.length)>0&&s(i.data.filter(e=>{var l;return null==e?void 0:null===(l=e.categories)||void 0===l?void 0:l.some(e=>{var l;return e._id===(null===(l=n[t-1])||void 0===l?void 0:l._id)})}).slice(0,5))},[i,t,n]),(0,l.jsx)(O.Z,{children:(0,l.jsx)(P.Z,{children:(0,l.jsx)(d.Z,{className:"g-8",children:(0,l.jsx)(N.Z,{ProductData:r,classObj:{productStyle:"product-standard",productBoxClass:"product-box-bg"},isHeadingVisible:!1})})})})},k=e=>{let{dataAPI:t}=e,[n,r]=(0,o.useState)(1),{filterCategory:s}=(0,o.useContext)(y.Z),c=s("product"),a=(0,o.useMemo)(()=>null==c?void 0:c.filter(e=>{var n;return null==t?void 0:null===(n=t.category)||void 0===n?void 0:n.includes(e._id)}),[c,t]);return(0,l.jsxs)(i.Z,{classes:{sectionClass:"product-section"},children:[(0,l.jsx)(w,{setActiveTab:r,activeTab:n,filterCategoryData:a,dataAPI:t}),(0,l.jsx)(S,{activeTab:"object"==typeof n?null==n?void 0:n._id:n,filterCategoryData:a})]})},E=e=>{var t,n;let{dataAPI:o}=e;return(0,l.jsx)(i.Z,{classes:{sectionClass:"banner-section"},noRowCol:!0,children:(0,l.jsxs)(d.Z,{className:"gy-xl-0 gy-3",children:[(0,l.jsx)(u.Z,{xl:6,children:(0,l.jsx)(r.Z,{classes:{customHoverClass:"banner-contain hover-effect"},imgUrl:null==o?void 0:null===(t=o.banner_1)||void 0===t?void 0:t.image_url,elem:null==o?void 0:o.banner_1})}),(0,l.jsx)(u.Z,{xl:6,children:(0,l.jsx)(r.Z,{classes:{customHoverClass:"banner-contain hover-effect"},imgUrl:null==o?void 0:null===(n=o.banner_2)||void 0===n?void 0:n.image_url,elem:null==o?void 0:o.banner_2})})]})})},A=n(18235),I=e=>{let{dataAPI:t}=e;return(0,l.jsx)(i.Z,{classes:{sectionClass:"banner-section"},colProps:{xs:12},children:(0,l.jsx)(r.Z,{classes:{customClass:"banner-contain hover-effect"},imgUrl:null==t?void 0:t.image_url,elem:t,customRatioClass:"img-fluid"})})},T=n(20657),D=e=>{let{dataAPI:t}=e,{filteredProduct:n}=(0,o.useContext)(T.Z);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(i.Z,{classes:{sectionClass:"product-section"},noRowCol:!0,children:(0,l.jsx)(N.Z,{dataAPI:null==t?void 0:t.products_list_1,ProductData:n,noCustomClass:!0,classObj:{productStyle:"product-standard",productBoxClass:"product-box-bg"},customSliderOption:j.UB})})})};n(95015);var L=n(82543),M=n(22434),B=n(29263),H=n(29994),U=n(68631),F=e=>{let{dataAPI:t}=e,{i18Lang:n}=(0,o.useContext)(b.Z),{t:r}=(0,x.$)(n,"common"),[s,c]=(0,o.useState)(""),[v,h]=(0,o.useState)(""),m=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return(0,l.jsx)(i.Z,{classes:{sectionClass:"newsletter-section-2 section-b-space"},noRowCol:!0,children:(0,l.jsx)(u.Z,{xs:12,children:(0,l.jsx)("div",{className:"newsletter-box hover-effect bg-size",style:{backgroundImage:"url(".concat(a.Ll,"/").concat(null==t?void 0:t.image_url,")")},children:(0,l.jsxs)(d.Z,{children:[(0,l.jsx)(u.Z,{xxl:8,xl:7,children:(0,l.jsx)("div",{className:"newsletter-detail p-center-left text-white",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{children:null==t?void 0:t.title}),(0,l.jsx)("h4",{children:null==t?void 0:t.sub_title}),(0,l.jsx)(L.Z,{className:"row g-2",children:(0,l.jsx)(u.Z,{sm:10,xs:12,children:(0,l.jsxs)("div",{className:"newsletter-form",children:[(0,l.jsx)(M.Z,{type:"email",id:"email",placeholder:"Enter your email",value:s,onChange:e=>c(e.target.value),invalid:!!v}),v&&(0,l.jsx)("div",{className:"text-danger",children:v}),(0,l.jsx)(B.Z,{className:"bg-white theme-color btn-md fw-500 submit-button",onClick:e=>{if(e.preventDefault(),!m(s)){h("Valid email required");return}h(""),console.log(s),(0,U.J)("success","Thank you"),c("")},children:(0,l.jsx)("span",{children:r("Subscribe")})})]})})})]})})}),(0,l.jsx)(u.Z,{xxl:4,xl:5,className:"d-xl-block d-none",children:(0,l.jsx)("div",{className:"shape-box",children:(0,l.jsx)(f.default,{src:H.Z,alt:"basket",className:"img-fluid image-1",height:294,width:512})})})]})})})})},$=n(87440),z=n(63983),V=n(92035),q=n(97400);n(11206);var G=()=>{var e,t,n,i,r,d,u,v,f,h,m,b,x,p,j,g,y,C,w,O,P,N,R,S,L,M,B,H,U,G,J,K;console.log("HOME Page");let{themeOption:W}=(0,o.useContext)(z.Z),{setGetProductIds:Q,isLoading:X}=(0,o.useContext)(T.Z),{data:Y,isLoading:ee,refetch:et,fetchStatus:en}=(0,s.a)(["rome"],()=>(0,c.Z)({url:"".concat(a.SK,"/rome")}),{enabled:!1,refetchOnWindowFocus:!1,select:e=>null==e?void 0:e.data});return((0,o.useEffect)(()=>(document.documentElement.style.setProperty("--theme-color","#e86923"),et(),()=>{document.documentElement.style.removeProperty("--theme-color")}),[]),(0,o.useEffect)(()=>{var e,t,n,l;ee||"fetching"!=en?document.body.classList.remove("skeleton-body"):document.body.classList.add("skeleton-body"),(null==Y?void 0:null===(t=Y.content)||void 0===t?void 0:null===(e=t.product)||void 0===e?void 0:e.length)>0&&Q({ids:null===(n=Array.from(new Set(null==Y?void 0:null===(l=Y.content)||void 0===l?void 0:l.product)))||void 0===n?void 0:n.join(",")})},["fetching"==en,!ee]),ee)?(0,l.jsx)(V.Z,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(q.Z,{dataAPI:null==Y?void 0:Y.content}),(null==Y?void 0:null===(t=Y.content)||void 0===t?void 0:null===(e=t.categories_image_list)||void 0===e?void 0:e.status)&&(0,l.jsx)(_,{dataAPI:null==Y?void 0:Y.categories}),(null==Y?void 0:null===(i=Y.content)||void 0===i?void 0:null===(n=i.value_banners)||void 0===n?void 0:n.status)&&(null==Y?void 0:null===(u=Y.content)||void 0===u?void 0:null===(d=u.value_banners)||void 0===d?void 0:null===(r=d.banners)||void 0===r?void 0:r.length)>0&&(0,l.jsx)(Z,{dataAPI:null==Y?void 0:null===(v=Y.content)||void 0===v?void 0:v.value_banners}),(null==Y?void 0:null===(h=Y.content)||void 0===h?void 0:null===(f=h.categories_products)||void 0===f?void 0:f.status)&&(null==Y?void 0:null===(b=Y.content)||void 0===b?void 0:null===(m=b.categories_products)||void 0===m?void 0:m.category.length)>0&&(0,l.jsx)(k,{dataAPI:null==Y?void 0:null===(x=Y.content)||void 0===x?void 0:x.categories_products}),(null==Y?void 0:null===(j=Y.content)||void 0===j?void 0:null===(p=j.two_column_banners)||void 0===p?void 0:p.status)&&(0,l.jsx)(E,{dataAPI:null==Y?void 0:null===(g=Y.content)||void 0===g?void 0:g.two_column_banners}),(null==Y?void 0:null===(C=Y.content)||void 0===C?void 0:null===(y=C.slider_products)||void 0===y?void 0:y.status)&&(0,l.jsx)(A.Z,{dataAPI:null==Y?void 0:null===(w=Y.content)||void 0===w?void 0:w.slider_products,classes:{boxClass:"category-menu"}}),(null==Y?void 0:null===(P=Y.content)||void 0===P?void 0:null===(O=P.full_width_banner)||void 0===O?void 0:O.status)&&(0,l.jsx)(I,{dataAPI:null==Y?void 0:null===(N=Y.content)||void 0===N?void 0:N.full_width_banner}),(null==Y?void 0:null===(S=Y.content)||void 0===S?void 0:null===(R=S.products_list_1)||void 0===R?void 0:R.status)&&(null==Y?void 0:null===(B=Y.content)||void 0===B?void 0:null===(M=B.products_list_1)||void 0===M?void 0:null===(L=M.product)||void 0===L?void 0:L.length)>0&&(0,l.jsx)(D,{dataAPI:null==Y?void 0:Y.content}),(null==Y?void 0:null===(U=Y.content)||void 0===U?void 0:null===(H=U.news_letter)||void 0===H?void 0:H.status)&&(0,l.jsx)(F,{dataAPI:null==Y?void 0:null===(G=Y.content)||void 0===G?void 0:G.news_letter}),(null==W?void 0:null===(J=W.general)||void 0===J?void 0:J.sticky_cart_enable)&&(null==W?void 0:null===(K=W.general)||void 0===K?void 0:K.cart_style)!=="cart_sidebar"&&(0,l.jsx)($.Z,{})]})}},55291:function(){},9051:function(){}}]);