1import{_ as f}from"./Bz4AsJpL.js";import{A as m,o as t,c as a,a as e,F as _,N as g,L as c,t as p,n as k,e as C,O as L,q as I,r as w,b,w as x,z as A,P as v,Q as T}from"./Ct35PZoH.js";import{N as q,S as N,C as V}from"./B7CvjcBi.js";import{a as B}from"./B26EToBd.js";import{_ as R}from"./DlAUqK2U.js";const U={key:0},z={class:"max-w-7xl mx-auto py-6"},E={class:"grid grid-cols-5 gap-6"},F=["onClick"],Q=["src","alt"],H=["alt"],M={class:"p-3 space-y-2"},O={class:"font-bold text-sm"},j={class:"text-sm text-gray-700 line-clamp-2"},G={__name:"TrendingVoucherList",props:{trendingVouchers:{type:Array,required:!0}},setup(o){const r=o,{trendingVouchers:n}=r,d=l=>{k({path:l})};return(l,u)=>m(n)?.length>0?(t(),a("div",U,[e("div",z,[u[0]||(u[0]=e("h2",{class:"font-bold text-xl mb-6"},"Celebrate Sale Day",-1)),e("div",E,[(t(!0),a(_,null,g(m(n),(s,h)=>(t(),a("div",{class:"deal-box border border-slate-200 rounded-lg cursor-pointer",onClick:$=>d("/brands/"+s?.storeId?.storeLink),key:h},[s?.logoImage!=null?(t(),a("img",{key:0,class:"rounded-t-lg",src:s?.logoImage?.url,alt:s?._id},null,8,Q)):c("",!0),s?.logoImage==null?(t(),a("img",{key:1,class:"rounded-t-lg",src:f,alt:s?._id},null,8,H)):c("",!0),e("div",M,[e("h6",O,p(s?.voucherTag),1),e("p",j,p(s?.voucherTitle),1)])],8,F))),128))])])])):c("",!0)}},W={key:0},J={class:"max-w-7xl mx-auto py-6"},K={class:"grid grid-cols-8 gap-x-6 place-items-center"},X=["onClick"],Y=["src","alt"],Z=["alt"],ee={class:"text-center mt-4"},se={__name:"PopularStoreList",props:{popularStores:{type:Array,required:!0}},setup(o){const r=o,{popularStores:n}=r,d=l=>{k({path:l})};return(l,u)=>m(n)?.length>0?(t(),a("div",W,[e("div",J,[u[0]||(u[0]=e("h2",{class:"font-bold text-xl mb-6"},"Sale day savings from top stores",-1)),e("div",K,[(t(!0),a(_,null,g(m(n),s=>(t(),a("div",{class:"cursor-pointer",key:s?._id,onClick:h=>d("/brands/"+s?.storeLink)},[s?.logoImage!=null?(t(),a("img",{key:0,class:"size-28",src:s?.logoImage?.url,alt:s?._id},null,8,Y)):c("",!0),s?.logoImage==null?(t(),a("img",{key:1,class:"size-28",src:f,alt:s?._id},null,8,Z)):c("",!0),e("p",ee,p(s?.storeName),1)],8,X))),128))])])])):c("",!0)}},te={key:0},oe={class:"max-w-7xl mx-auto py-6"},ae={class:"font-bold text-xl mt-8 mb-4"},ne={class:"grid grid-cols-5 gap-6"},le=["src","alt"],re=["alt"],ie={class:"p-3 space-y-3"},ce={class:"font-bold text-sm uppercase"},de={class:"text-sm text-gray-700 line-clamp-2"},ue=["onClick"],pe={__name:"Section",props:{section:{type:Array,required:!0}},setup(o){const r=o,{section:n}=r,d=l=>{k({path:l})};return(l,u)=>m(n)?(t(),a("div",te,[e("div",oe,[e("h2",ae,p(m(n).name),1),e("div",ne,[(t(!0),a(_,null,g(m(n)?.vouchers,(s,h)=>(t(),a("div",{class:"deal-box border border-slate-200 rounded-lg cursor-pointer",key:h},[s?.logoImage!=null?(t(),a("img",{key:0,class:"rounded-t-lg",src:s?.logoImage?.url,alt:s?._id},null,8,le)):c("",!0),s?.logoImage==null?(t(),a("img",{key:1,class:"rounded-t-lg",src:f,alt:s?._id},null,8,re)):c("",!0),e("div",ie,[e("h6",ce,p(s?.voucherTag),1),e("p",de,p(s?.voucherTitle),1),e("p",{class:"font-semibold uppercase text-green-700 text-xs",onClick:$=>d("/brands/"+s?.storeId?.storeLink)},"Get Access",8,ue)])]))),128))])])])):c("",!0)}},_e=C({name:"WrapAround",components:{Carousel:V,Slide:N,Navigation:q},data(){return{slides:[],settings:{itemsToShow:1,snapAlign:"center"},breakpoints:{1024:{itemsToShow:2.5,snapAlign:"center"}},salePageData:{}}},async mounted(){const o=L(),{$axios:r}=I(),d=w().public.API_BASE_URL+B.getSalePage+o.params.link;this.getCouponsLandingScreenData(r,d)},methods:{getCouponsLandingScreenData(o,r){try{o.get(r).then(n=>{if(this.salePageData=n?.data?.data?.length>0?n?.data?.data[0]:null,this.salePageData){const d=[];(this.salePageData?.pageDescriptions).sort((l,u)=>l.sequence-u.sequence).forEach(l=>{d.push(l)}),this.salePageData.pageDescriptions=d}else k({path:"/404"})})}catch(n){console.log(n)}},navigate(o){k({path:o})}}}),ge={key:0},me={class:"py-8"},he={class:"carousel__item px-4"},ye=["onClick"],be=["src","alt"],ke={class:"bg-gray-50 py-10"},$e={class:"max-w-7xl mx-auto"},xe={key:0,class:"bg-white border rounded-lg"},ve={class:"p-6"},fe={class:"que font-semibold mb-3"},Se={class:"ans text-sm text-gray-700 pb-4"},De={key:1,class:"bg-white border rounded-lg mt-10 text-sm"},Pe={class:"text-lg mb-2 font-semibold"},Ce={class:"text-gray-800"},Le=["innerHTML"];function Ie(o,r,n,d,l,u){const s=v("Slide"),h=v("Navigation"),$=v("Carousel"),S=G,D=se,P=pe;return o.salePageData&&Object.keys(o.salePageData).length?(t(),a("div",ge,[e("div",me,[b($,A({autoplay:3e3},o.settings,{breakpoints:o.breakpoints,"wrap-around":!0}),{addons:x(()=>[b(h)]),default:x(()=>[(t(!0),a(_,null,g(o.salePageData?.trendingBanners,i=>(t(),T(s,{key:i?.logoImage?.url},{default:x(()=>[e("div",he,[e("div",{class:"cursor-pointer",onClick:y=>o.navigate("/brands/"+i?.storeId?.storeLink)},[e("img",{src:i?.logoImage?.url,alt:i?._id,class:"rounded-lg"},null,8,be)],8,ye)])]),_:2},1024))),128))]),_:1},16,["breakpoints"])]),b(S,{trendingVouchers:o.salePageData?.trendingVouchers},null,8,["trendingVouchers"]),b(D,{popularStores:o.salePageData?.popularStores},null,8,["popularStores"]),(t(!0),a(_,null,g(o.salePageData?.sections,(i,y)=>(t(),a("div",{key:y},[b(P,{section:i},null,8,["section"])]))),128)),e("div",ke,[e("div",$e,[o.salePageData?.faqs.length>0?(t(),a("div",xe,[r[0]||(r[0]=e("div",{class:"border-b p-6"},[e("h2",{class:"font-medium text-lg"},"Frequently Asked Questions")],-1)),e("div",ve,[(t(!0),a(_,null,g(o.salePageData?.faqs,(i,y)=>(t(),a("div",{key:y},[e("h3",fe,"Q. "+p(i?.question),1),e("div",Se,[e("p",null,p(i?.answer),1)])]))),128))])])):c("",!0),o.salePageData?.pageDescriptions.length>0?(t(),a("div",De,[(t(!0),a(_,null,g(o.salePageData?.pageDescriptions,(i,y)=>(t(),a("div",{class:"border-b p-4",key:y}
1,[e("h3",Pe,p(i?.title),1),e("div",Ce,[e("p",{innerHTML:i?.content},null,8,Le)])]))),128))])):c("",!0)])])])):c("",!0)}const Ve=R(_e,[["render",Ie]]);export{Ve as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.