import M from"./CE4It_C4.js";import V from"./CWalxxGV.js";import E from"./3yN3dRTL.js";import G from"./GQCWnG0A.js";import{_ as I}from"./CglRsQQc.js";import{z as R,b as j,s as i,u as q,e as z,r as h,H as T,f as l,h as U,i as u,w as J,P as K,j as e,k as m,m as s,p as o,F as g,B as v,A as O,l as y,t as Q}from"./BCLrUOBx.js";import{u as W}from"./CUay5wT4.js";import{u as X}from"./CCot8u0_.js";import"./CTAcmMAz.js";import"./a5umXhxZ.js";import"./Bxmfm8sn.js";import"./Di7fl9dA.js";import"./BnLnKt_p.js";import"./Ce8lFovl.js";const Y={class:"container-fluid mtb-20 mtb-sm-15"},Z={class:"flash-list"},tt={key:0,class:"tile-container"},et={class:"shimmer-wrapper"},st={key:1,class:"pos-rel"},ot={key:0,class:"spinner-wrapper flex layer-white"},at={key:1,class:"info-msg"},nt={key:2,class:"tile-container"},Ft={__name:"[id]",setup(rt){const{shimmerCount:S}=R(),p=j(),{customScripts:ct,site_setting:k}=i(p),{unAuthGet:w}=p,x=q(),{langCode:F}=i(x),_=W(),{products:d}=i(_),{emptyFlashProducts:P,setFlashProducts:C}=_,{pageMeta:B}=X();z(B(k.value)),h(!1);const c=h(!1),a=T(),n=l(()=>{var t;return((t=d.value)==null?void 0:t.data)||null}),L=l(()=>{var t;return(t=d.value)==null?void 0:t.last_page}),f=l(()=>{var t;return(t=a==null?void 0:a.params)==null?void 0:t.id}),$=async()=>{c.value=!0;const t=await w({api:"flashProducts",lang:F.value,params:`/${f.value}?${K({id:f.value,page:Number(a.query.page)||1})}`});C(t==null?void 0:t.data),c.value=!1};return U(async()=>{P(),await $()}),(t,it)=>{const b=M,A=V,D=E,N=G,H=I;return e(),u(H,null,{default:J(()=>[m("div",Y,[m("div",Z,[o(n)?(e(),s("div",st,[o(c)?(e(),s("div",ot,[y(A,{radius:100})])):O("",!0),o(n)&&!o(n).length?(e(),s("div",at,Q(t.$t("listingLayout.noProductFound")),1)):(e(),s("div",nt,[(e(!0),s(g,null,v(o(n),(r,lt)=>(e(),u(D,{key:r.id,"flash-product":r,class:"p-tile"},null,8,["flash-product"]))),128))])),y(N,{"total-page":o(L)},null,8,["total-page"])])):(e(),s("div",tt,[m("div",et,[(e(!0),s(g,null,v(o(S).FLASH_SALE,r=>(e(),u(b,{key:r}))),128))])]))])])]),_:1})}}};export{Ft as default};
