import{_ as s}from"./B-_kobBQ.js";import{_ as a}from"./Y68v0LKX.js";import{d as t,a as e,i as l}from"./CJGEN_17.js";import{L as i,M as o,G as r,O as d,$ as c,H as n,r as m,c as p,a2 as h,W as u,u as g,V as b,P as w,Z as f,a1 as x}from"./BCDZ6bul.js";import{_ as v}from"./zbQsJHtv.js";import{_ as y}from"./CVuYS91Y.js";import{_}from"./CbEk0jDv.js";import{_ as j}from"./crlVIMgD.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))])}]]),z={class:"bg-[#F6F7FC] p-3 md:p-6 h-fit"},C={class:"font-bold text-xl lg:mb-10 mb-6"},E={key:1},L={key:0,class:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 gap-2"},$={class:"relative"},S=["disabled"],F={__name:"wishlist",setup(a){const t=m({wishlistName:""}),k=p(!1),F=e().$axios,{data:I,status:P,refresh:T}=l("faves",(()=>F("get_fave_products").then((s=>s.data.data)).catch((s=>s.response.data))));return(a,e)=>{const l=s,m=N,p=v,F=y,W=_,O=j;return i(),o("div",z,[c("h3",C,h(a.$t("TITLES.wishlist")),1),u("",!0),"pending"===g(P)?(i(),o("div",E,[n(m)])):"success"===g(P)?(i(),o(r,{key:2},[g(I)&&g(I).length?(i(),o("div",L,[(i(!0),o(r,null,d(g(I),(s=>(i(),b(p,{key:s.id,product:s,onRemoveWishlist:e[1]||(e[1]=s=>g(T)())},null,8,["product"])))),128))])):(i(),b(F,{key:1,class:"!min-h-[320px]"}))],64)):u("",!0),(i(),b(f,{to:"body"},[g(k)?(i(),b(O,{key:0,onClose:e[5]||(e[5]=s=>k.value=!1)},{default:w((()=>[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",$,[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(W,{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,S)])])),_:1})):u("",!0)]))])}}};export{F as default};
