import N from"./CWalxxGV.js";import V from"./CE4It_C4.js";import $ from"./Dyp1qGEf.js";import b from"./GQCWnG0A.js";import F from"./DaBytPEG.js";import{b as H,s as d,e as U,u as j,r as u,H as z,f,y as E,I as G,h as I,i as h,w as g,P as Z,j as e,l as r,m as s,T as J,A as K,p as a,t as O,k as y,F as v,B as w}from"./BCLrUOBx.js";import{u as Q}from"./CCot8u0_.js";import"./CTAcmMAz.js";import"./B2sEaWda.js";import"./a5umXhxZ.js";import"./Bxmfm8sn.js";import"./BnLnKt_p.js";import"./Di7fl9dA.js";import"./Ce8lFovl.js";const X={key:0,class:"spinner-wrapper flex"},Y={key:0,class:"info-msg"},tt={key:1,class:"area"},et={class:"area-content"},st={class:"tile-container"},at={key:0,class:"shimmer-wrapper pt-15"},kt={__name:"wishlists",setup(ot){const m=H(),{getRequest:k}=m,{customScripts:nt,site_setting:q}=d(m),{pageMeta:B}=Q();U(B(q.value));const S=j(),{langCode:x}=d(S),i=u(null),n=u(!1),o=z(),W=f(()=>{var t;return(t=i.value)==null?void 0:t.last_page}),c=f(()=>{var t;return(t=i.value)==null?void 0:t.data}),p=u(null),C=async()=>{p.value.routeParam()},{getTimeZone:D}=E(),_=async()=>{n.value=!0;const t=await k({params:`?${Z({time_zone:D(),order_by:o.query.orderBy||"created_at",type:o.query.orderByType||"desc",page:o.query.page||1,q:o.query.q||null})}`,api:"userWishlistAll",lang:x.value});(t==null?void 0:t.status)===200&&(i.value=t.data),n.value=!1};return G(()=>o.query,async()=>{await _()}),I(async()=>{await _()}),(t,rt)=>{const P=N,R=V,T=$,A=b,L=F;return e(),h(L,{"active-route":"wishlists",onClickedWishlists:C,class:"flow-hidden"},{rightArea:g(()=>[r(J,{name:"fade",mode:"out-in"},{default:g(()=>[a(n)?(e(),s("div",X,[r(P,{radius:100})])):K("",!0)]),_:1}),a(c)&&!a(c).length?(e(),s("div",Y,O(t.$t("wishlist.noWishlist")),1)):(e(),s("div",tt,[y("div",et,[y("div",st,[a(n)?(e(),s("div",at,[(e(),s(v,null,w(8,l=>r(R,{key:l})),64))])):(e(!0),s(v,{key:1},w(a(c),(l,M)=>(e(),h(T,{key:M,product:l.product},null,8,["product"]))),128))])])])),r(A,{class:"mt-20 mt-sm-15",ref_key:"wishlistPaginationRef",ref:p,"total-page":a(W)},null,8,["total-page"])]),_:1})}}};export{kt as default};
