import k from"./DiAtKFwY.js";import{b as v,s as r,u as x,d as A,e as C,x as F,m as p,i as $,A as b,p as s,t as w,j as n}from"./BCLrUOBx.js";import{u as B}from"./CUay5wT4.js";import{u as D}from"./DFFf0IVd.js";import{u as H}from"./VJGZwNiG.js";import{u as L}from"./CCot8u0_.js";import"./DEdyn6s7.js";import"./zH0z38ay.js";import"./x_rD_Ya3.js";import"./3yN3dRTL.js";import"./CTAcmMAz.js";import"./a5umXhxZ.js";import"./Bxmfm8sn.js";import"./Di7fl9dA.js";import"./BnLnKt_p.js";import"./Ce8lFovl.js";import"./-hq_PDZF.js";import"./CglRsQQc.js";const M={class:"container-fluid mtb-20 mtb-sm-15"},j={key:1,class:"info-msg"},rt={__name:"index",async setup(E){var u;let e,m;const i=v(),{customScripts:G,site_setting:c}=r(i),_=x(),{langCode:f}=r(_),l=D(),{flashSales:t}=r(l),{setFlashSale:h}=l,d=B(),{fetchFlashSales:I}=d,{t:S}=A(),{pageMeta:g}=L();C(g({...c.value,meta_title:`${S("header.categories")} | ${(u=c.value)==null?void 0:u.meta_title}`}));const{data:N,pending:P,error:R}=([e,m]=F(async()=>H("flash-sale",async()=>{if(t.value)return!0;const{unAuthGet:a}=i,o=await a({api:"flashSales",params:"",lang:f.value});return h(o.data),o.data})),e=await e,m(),e);return(a,o)=>{const y=k;return n(),p("div",M,[s(t)&&s(t).length?(n(),$(y,{key:0,"flash-sales":s(t)},null,8,["flash-sales"])):s(t)?(n(),p("p",j,w(a.$t("listingLayout.noProductFound")),1)):b("",!0)])}}};export{rt as default};
