import{_ as s}from"./CAh9dhZi.js";import{_ as a}from"./BW_umApC.js";import{f as t,u as e,a as l}from"./DWm3uysK.js";import{L as i,M as o,F as r,O as d,$ as c,x as n,r as m,c as p,a2 as h,W as u,u as g,V as b,P as f,Z as w,a1 as x}from"./CFGNYEIb.js";import{_ as v}from"./C5KV0B1Q.js";import{_ as y}from"./Bs3W0MKb.js";import{_}from"./DX8oQEjP.js";import{_ as j}from"./BU5jUPSY.js";import"./mqjJGHgV.js";const k={class:"grid grid-cols-2 md:grid-cols-2 xl:grid-cols-3 gap-4"};const N=t({},[["render",function(s,t){const e=a;return i(),o("div",k,[(i(),o(r,null,d(6,(s=>c("div",{key:s,class:"space-y-4"},[n(e,{class:"h-[280px] bg-white sm:h-[320px] w-[100%]"}),n(e,{class:"h-[14px] w-[70%] bg-white"}),n(e,{class:"h-[14px] w-[40%] bg-white"}),n(e,{class:"h-[14px] w-[50%] bg-white"})]))),64))])}]]),C={class:"bg-[#F6F7FC] p-3 md:p-6 h-fit"},E={class:"font-bold text-xl lg:mb-10 mb-6"},S={key:1},$={key:0,class:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 gap-2"},z={class:"relative"},F=["disabled"],L={__name:"wishlist",setup(a){const t=m({wishlistName:""}),k=p(!1),L=e().$axios,{data:W,status:P,refresh:T}=l("faves",(()=>L("get_fave_products").then((s=>s.data.data)).catch((s=>s.response.data))));return(a,e)=>{const l=s,m=N,p=v,L=y,I=_,U=j;return i(),o("div",C,[c("h3",E,h(a.$t("TITLES.wishlist")),1),u("",!0),"pending"===g(P)?(i(),o("div",S,[n(m)])):"success"===g(P)?(i(),o(r,{key:2},[g(W)&&g(W).length?(i(),o("div",$,[(i(!0),o(r,null,d(g(W),(s=>(i(),b(p,{key:s.id,product:s,onRemoveWishlist:e[1]||(e[1]=s=>g(T)())},null,8,["product"])))),128))])):(i(),b(L,{key:1,class:"!min-h-[320px]"}))],64)):u("",!0),(i(),b(w,{to:"body"},[g(k)?(i(),b(U,{key:0,onClose:e[5]||(e[5]=s=>k.value=!1)},{default:f((()=>[c("div",{onClick:e[4]||(e[4]=x((()=>{}),["stop"])),class:"bg-white w-[540px] max-h-[95%] overflow-y-auto max-w-[90%] py-6 lg:py-10 px-4 lg:px-8","data-aos":"zoom-in","data-aos-duration":"800"},[c("div",z,[e[8]||(e[8]=c("h4",{class:"text-3xl capitalize text-center mb-10 font-bold"}," Create a wishlist ",-1)),c("button",{class:"absolute size-12 top-1/2 border border-[#E1E1E1] flex items-center justify-center rounded-full -translate-y-1/2 end-0",onClick:e[2]||(e[2]=s=>k.value=!1)},[n(l,{name:"close-2"})])]),n(I,{name:"wishlistName",label:a.$t("LABELS.wishlistName"),placeholder:a.$t("INPUTS.wishlistName"),value:g(t).wishlistName,"onUpdate:value":e[3]||(e[3]=s=>g(t).wishlistName=s)},null,8,["label","placeholder","value"]),c("button",{disabled:!g(t).wishlistName,class:"base-btn mt-10 w-full capitalize !h-14"}," Save Wishlist ",8,F)])])),_:1})):u("",!0)]))])}}};export{L as default};
