"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7685],{89553:function(t,e,o){o.d(e,{f:function(){return T}});var a=o(35944),i=o(67294),r=o(90762),n=o(11674),l=o(79512),d=o(54479),p=o(28220),c=o(87379);let s=c.ZP.div.withConfig({componentId:"sc-491b4fa8-0"})(["padding-top:24px;&[data-is-profile-page='true']{padding:0px;}padding-bottom:40px;","{padding:24px 0;}","{padding:16px 0;}"],p.M.tdOnly,p.M.mbDown),g=c.ZP.div.withConfig({componentId:"sc-491b4fa8-1"})(["margin:21px auto;position:relative;.icon-header{position:absolute;top:0;right:0;padding:16px;","{padding:32px 24px;}}","{margin:0px;}&[data-is-profile-page='true']{margin:16px auto;","{margin:0px;}}"],p.M.tdOnly,p.M.tdDown,p.M.tdDown);c.ZP.div.withConfig({componentId:"sc-491b4fa8-2"})(["border-radius:8px;padding:16px;background-size:cover;background-origin:content-box;background-repeat:no-repeat;background-position:center;width:100%;max-height:440px;height:440px;position:relative;","{padding:0px;max-height:210px;border-radius:0px;}"],p.M.tdDown);let u=c.ZP.div.withConfig({componentId:"sc-491b4fa8-3"})(["width:calc(100% - 392px);margin:32px auto 0;&[data-is-profile-page='true']{width:100%;}","{margin:0;width:100%;}","{padding:24px 0;}","{padding:16px 0;}"],p.M.tdDown,p.M.tdOnly,p.M.mbDown),m=c.ZP.div.withConfig({componentId:"sc-491b4fa8-4"})(["display:flex;gap:12px;align-items:center;margin-top:12px;position:relative;"]),h=c.ZP.div.withConfig({componentId:"sc-491b4fa8-5"})(["display:flex;align-items:center;gap:8px;"]);c.ZP.div.withConfig({componentId:"sc-491b4fa8-6"})(["width:1px;height:16px;background:",";","{display:none;}"],t=>{let{theme:e}=t;return e.colors.neutral100},p.M.tdDown);let E=c.ZP.div.withConfig({componentId:"sc-491b4fa8-7"})(["line-height:1.7;> *{&:not(:last-child){margin-bottom:16px;}}ul,ol{padding-left:16px;> li{margin-bottom:8px;}}ul{list-style:disc;> li{&::marker{color:",";font-size:10px;}}}ol{list-style:decimal;}table{table-layout:fixed;td *{max-width:100%;}}[data-content-type='button-item']{display:flex;justify-content:center;align-items:center;}[class^='pagebuilder-button'],[class*=' pagebuilder-button']{padding:1rem;border-radius:4px;background-color:",";color:",";font-weight:600;text-decoration:none;display:inline-block;text-align:center;cursor:pointer;transition:all 0.3s ease-in-out;&:hover{background-color:",";}}"],t=>{let{theme:e}=t;return e.colors.primaryBase},t=>{let{theme:e}=t;return e.colors.primaryBase},t=>{let{theme:e}=t;return e.colors.white},t=>{let{theme:e}=t;return e.colors.primaryHover}),f=c.ZP.div.withConfig({componentId:"sc-491b4fa8-8"})(["margin-top:32px;display:flex;flex-direction:column;gap:16px;","{margin-top:24px;}"],p.M.tdDown),x=(0,c.ZP)(r.xu).withConfig({componentId:"sc-491b4fa8-9"})(["display:flex;flex-direction:row;align-items:flex-start;padding:16px 20px;background:",";border-radius:4px;"],t=>t.theme.colors.white),G=c.ZP.div.withConfig({componentId:"sc-491b4fa8-10"})(["border-bottom:1px solid ",";width:100%;margin:16px 0;","{margin:24px 0;}"],t=>t.theme.colors.neutral100,p.M.mbUp),T=t=>{var e;let{customDataProps:o,promotionDetail:p,pageType:c,hideBreadcrumb:T}=t,v=d.D1.useTranslation(),{isDesktop:b}=d.v3.useDevice(),P=d.zM.usePush(),{name:_,slug:A,banners:O,description:D,expiredDate:w}=p,[M]=(0,i.useState)(!1),y="PROFILE_MANAGE_VOUCHER_DETAIL"===c,C=[{label:v({id:"breadcrumb.home",defaultMessage:"Trang chủ"}),value:d.zM.getNewRelativeURL("","shop").toString()},{label:v({id:"breadcrumb.promotions",defaultMessage:"promotions"}),value:d.zM.getLocalisedUrl("","PROMOTION").toString()},{label:null!=_?_:"",value:d.zM.getLocalisedUrl("".concat(A),"PROMOTION").toString()}],R=()=>{P(d.zM.getLocalisedUrl("","PROFILE_MANAGE_VOUCHER"))};return(0,a.BX)(s,{"data-loading":M,"data-is-profile-page":y,...o,children:[T?null:(0,a.BX)(a.HY,{children:[!y&&(0,a.tZ)("div",{className:"page-breadcrumbs-wrapper",children:(0,a.tZ)(r.EW,{isDesktopPadding:b,children:(0,a.tZ)(l.O,{pages:C,size:"md"})})}),y&&b&&(0,a.tZ)(r.EW,{isDesktopPadding:b,children:(0,a.BX)(x,{children:[(0,a.tZ)(r.zx,{customDataProps:{style:{padding:0}},size:"sm",color:"ghost",onClick:()=>R(),children:(0,a.BX)(r.xv,{size:"s2",colour:"secondaryBase",customDataProps:{style:{opacity:.8,cursor:"pointer"}},children:[v({id:"breadcrumb.promotions",defaultMessage:"promotions"}),"\xa0 / \xa0"]})}),(0,a.tZ)(r.xv,{size:"s2",colour:"secondaryBase",children:_})]})})]}),(0,a.tZ)(r.EW,{isDesktopPadding:b,children:(0,a.BX)(g,{"data-is-profile-page":y,children:[(null==O?void 0:O.length)&&(0,a.tZ)(n.E,{style:{width:"calc(100% + 32px)",marginLeft:-16,marginRight:-16,maxWidth:"calc(100% + 32px)"},src:b?O[0].featuredImage:O[0].mobileImage,alt:O[0].alt}),(0,a.tZ)(u,{"data-is-profile-page":y,children:(0,a.tZ)("div",{className:"box-title",children:(0,a.BX)("div",{children:[(0,a.tZ)(r.X6,{tag:"h5",weight:"bold",colour:"gray800",customDataProps:{style:{textTransform:"capitalize"}},children:_}),(0,a.tZ)(m,{children:w&&(0,a.BX)(h,{children:[(0,a.BX)(r.xv,{size:"p3",colour:"gray600",children:[v({id:"promotions.detail.expirationDate",defaultMessage:"Ng\xe0y hết hạn"}),":"]}),(0,a.tZ)(r.xv,{size:"s4",colour:"primaryBase",weight:b?void 0:"semi-bold",children:w})]})}),(0,a.tZ)(G,{}),D&&(0,a.tZ)(f,{children:(0,a.tZ)(E,{dangerouslySetInnerHTML:{__html:D}})})]})})})]})})]})}},51219:function(t,e,o){o.d(e,{Ml:function(){return a.M},Ut:function(){return g},lu:function(){return d},vM:function(){return c},AP:function(){return s.A}});var a=o(42888),i=o(40418),r=o(71500),n=o(65668),l=o(76902);let d={getNavigationData:async()=>{var t;let[e,o,a]=await Promise.all([(0,i.g)("ecom-layout",()=>n.G.callApiWithAuth({to:"ecom",path:"GET_LAYOUT",method:"GET"}),t=>{var e;return!!(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.store_id)&&(null==t?void 0:t.status)===1},3e5),(0,i.g)("discover-footer",()=>n.G.callApi({to:"discover",path:"GET_FOOTER",method:"GET"}),t=>{var e,o;return!!(null==t?void 0:null===(o=t.data)||void 0===o?void 0:null===(e=o.data)||void 0===e?void 0:e.general)&&(null==t?void 0:t.status)===1},3e5),(0,r.a)(l.SP)]);return{...e,data:{...null==e?void 0:e.data,dataNavMenuContent:a,footer:(null==o?void 0:o.data)||(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.footer)}}},getHomePageData:()=>n.G.callApi({to:"ecom",path:"GET_HOME_PAGE",method:"GET"}),getCareTopService:()=>n.G.callApi({to:"care",path:"GET_HOMEPAGE_TOP_SERVICE",method:"GET"}),getBrandPageData:t=>n.G.callApi({to:"ecom",path:"GET_BRAND_PAGE",method:"GET",params:{slug:t}}),getCategoryPageData:t=>n.G.callApi({to:"ecom",path:"GET_CATEGORY_PAGE",method:"GET",params:{slug:t}}),getCategoryBestsellerProducts:t=>n.G.callApi({to:"ecom",path:"GET_CATEGORY_BEST_SELLER_PRODUCTS",method:"GET",params:{slug:t}}),getBrandBestsellerProducts:t=>n.G.callApi({to:"ecom",path:"GET_BRAND_BEST_SELLER_PRODUCTS",method:"GET",params:{slug:t}}),getProductDetailPageData:(t,e)=>n.G.callApiWithAuth({to:"ecom",path:"GET_PRODUCT_DETAIL_PAGE",method:"GET",params:{slug:t},reqCookie:e}),getSuggestionBlocksData:(t,e)=>n.G.callApi({to:"ecom",path:"GET_SUGGESTION_BLOCKS",method:"GET",reqCookie:e,params:{isHotdeal:String("boolean"==typeof t?t:"")}})};var p=o(54479);let c={getOrders:function(t){let{params:e}=t||{};return p.GH.callApiWithAuth({to:"ecom",path:"GET_ORDERS",method:"GET",params:e})},getOrderDetail:function(t,e){let{params:o}=t||{};return p.GH.callApiWithAuth({to:"ecom",path:"GET_ORDER_DETAIL",method:"GET",params:o,reqCookie:e})},getOrderConfirmation:function(t,e){return p.GH.callApiWithAuth({to:"ecom",path:"GET_ORDER_CONFIRMATION",method:"GET",params:{orderNumber:t},reqCookie:e})}};var s=o(97038);let g={getBrands:function(t){let{params:e}=t||{};return p.GH.callApi({to:"ecom",path:"GET_BRANDS",method:"GET",params:e})},getServiceUrl:function(t){let{slug:e}=t;return p.zM.getLocalisedUrl(e,"BRAND")}}},69986:function(t,e,o){o.d(e,{S:function(){return i}});var a=o(54479);let i={getPromotionsList:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{page:"1",perPage:"5"};return a.GH.callApi({to:"ecom",path:"GET_PROMOTIONS",method:"GET",params:{page:String(t.page),perPage:String(t.perPage)}})},getPromotions:function(t){let{params:e}=t||{};return a.GH.callApi({to:"ecom",path:"GET_PROMOTIONS_PAGE",method:"GET",params:e})},getPromotionDetail:t=>a.GH.callApi({to:"ecom",path:"GET_PROMOTION_DETAIL",method:"GET",params:{slug:t}}),getVoucherByStatus:function(t){let{params:e}=t||{};return a.GH.callApiWithAuth({to:"ecom",path:"GET_VOUCHER_LIST_BY_STATUS",method:"GET",params:e})}}}}]);