import { g } from './SvgIcon-DmMp038e.mjs';
import { u } from './Skeleton-Bnk8IDLx.mjs';
import { mergeProps, reactive, ref, unref, withCtx, createVNode, withModifiers, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderList, ssrRenderComponent, ssrInterpolate, ssrRenderTeleport, ssrIncludeBooleanAttr } from 'vue/server-renderer';
import { d as uf, a as Qt, i as wn } from './server.mjs';
import { $ } from './ProductCard-DREvqRsZ.mjs';
import { a } from './NoData-_gkxejn4.mjs';
import { o } from './Backdrop-Ez8lg5QV.mjs';
import { q } from './BaseTextInput-BPxtRr_w.mjs';
import '../_/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:fs';
import 'node:url';
import 'node:path';
import 'unhead';
import '@unhead/shared';
import 'vue-router';
import 'vue-rate';
import 'date-fns';
import '@hennge/vue3-pagination';
import 'axios';
import 'vue-social-sharing';
import './star-mqjJGHgV.mjs';

const y = {};
const S = y.setup;
y.setup = (e2, s2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Shared/WishlistSkelton.vue"), S ? S(e2, s2) : undefined;
};
const _ = uf(y, [["ssrRender", function(e2, t2, i2, l2) {
  const o2 = u;
  t2(`<div${ssrRenderAttrs(mergeProps({ class: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4" }, l2))}><!--[-->`), ssrRenderList(6, (e3) => {
    t2('<div class="space-y-4">'), t2(ssrRenderComponent(o2, { class: "h-[320px] w-[100%] rounded-md" }, null, i2)), t2(ssrRenderComponent(o2, { class: "h-[14px] w-[70%]" }, null, i2)), t2(ssrRenderComponent(o2, { class: "h-[14px] w-[40%]" }, null, i2)), t2(ssrRenderComponent(o2, { class: "h-[14px] w-[50%]" }, null, i2)), t2("</div>");
  }), t2("<!--]--></div>");
}]]), j = { __name: "wishlist", __ssrInlineRender: true, setup(s2) {
  const t2 = reactive({ wishlistName: "" }), v2 = ref(false), y2 = Qt().$axios, { data: S2, status: j2, refresh: k2 } = wn("faves", () => y2("get_fave_products").then((e2) => e2.data.data).catch((e2) => e2.response.data));
  return (s3, i2, l2, w2) => {
    const f2 = g, y3 = _, k3 = $, C = a, E = o, z = q;
    i2(`<div${ssrRenderAttrs(mergeProps({ class: "bg-[#F6F7FC] p-3 md:p-6 h-fit" }, w2))}><h3 class="font-bold text-xl mb-10">${ssrInterpolate(s3.$t("TITLES.wishlist"))}</h3>`), i2("<!---->"), "pending" === unref(j2) ? (i2("<div>"), i2(ssrRenderComponent(y3, null, null, l2)), i2("</div>")) : "success" === unref(j2) ? (i2("<!--[-->"), unref(S2) && unref(S2).length ? (i2('<div class="grid grid-cols-1 xs:grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 gap-2 md:gap-4"><!--[-->'), ssrRenderList(unref(S2), (e2) => {
      i2(ssrRenderComponent(k3, { key: e2.id, product: e2 }, null, l2));
    }), i2("<!--]--></div>")) : i2(ssrRenderComponent(C, { class: "!min-h-[320px]" }, null, l2)), i2("<!--]-->")) : i2("<!---->"), ssrRenderTeleport(i2, (e2) => {
      unref(v2) ? e2(ssrRenderComponent(E, { onClose: (e3) => v2.value = false }, { default: withCtx((e3, a2, i3, l3) => {
        if (!a2) return [createVNode("div", { onClick: withModifiers(() => {
        }, ["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" }, [createVNode("div", { class: "relative" }, [createVNode("h4", { class: "text-3xl capitalize text-center mb-10 font-bold" }, " Create a wishlist "), createVNode("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: (e4) => v2.value = false }, [createVNode(f2, { name: "close-2" })], 8, ["onClick"])]), createVNode(z, { name: "wishlistName", label: s3.$t("LABELS.wishlistName"), placeholder: s3.$t("INPUTS.wishlistName"), value: unref(t2).wishlistName, "onUpdate:value": (e4) => unref(t2).wishlistName = e4 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"]), createVNode("button", { disabled: !unref(t2).wishlistName, class: "base-btn mt-10 w-full capitalize !h-14" }, " Save Wishlist ", 8, ["disabled"])], 8, ["onClick"])];
        a2(`<div 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"${l3}><div class="relative"${l3}><h4 class="text-3xl capitalize text-center mb-10 font-bold"${l3}> Create a wishlist </h4><button class="absolute size-12 top-1/2 border border-[#E1E1E1] flex items-center justify-center rounded-full -translate-y-1/2 end-0"${l3}>`), a2(ssrRenderComponent(f2, { name: "close-2" }, null, i3, l3)), a2("</button></div>"), a2(ssrRenderComponent(z, { name: "wishlistName", label: s3.$t("LABELS.wishlistName"), placeholder: s3.$t("INPUTS.wishlistName"), value: unref(t2).wishlistName, "onUpdate:value": (e4) => unref(t2).wishlistName = e4 }, null, i3, l3)), a2(`<button${ssrIncludeBooleanAttr(!unref(t2).wishlistName) ? " disabled" : ""} class="base-btn mt-10 w-full capitalize !h-14"${l3}> Save Wishlist </button></div>`);
      }), _: 1 }, l2)) : e2("<!---->");
    }, "body", false, l2), i2("</div>");
  };
} }, k = j.setup;
j.setup = (e2, s2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("pages/profile/wishlist.vue"), k ? k(e2, s2) : undefined;
};

export { j as default };
//# sourceMappingURL=wishlist-DjRNnZUk.mjs.map
