import { u } from './Skeleton-Bnk8IDLx.mjs';
import { mergeProps, ref, unref, withCtx, createVNode, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderList, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrRenderTeleport } from 'vue/server-renderer';
import { d as uf, b as Qs, a as Qt, i as wn } from './server.mjs';
import { a } from './NoData-DiE8X5YK.mjs';
import { o } from './Backdrop-Ez8lg5QV.mjs';
import { A, g } from './star-mqjJGHgV.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 './SvgIcon-BKMVrGmr.mjs';

const $ = {};
const y = $.setup;
$.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Shared/ReviewSkelton.vue"), y ? y(e2, t2) : undefined;
};
const j = uf($, [["ssrRender", function(s2, a2, i2, o2) {
  const r2 = u;
  a2(`<div${ssrRenderAttrs(mergeProps({ class: "grid grid-cols-1 gap-8" }, o2))}><!--[-->`), ssrRenderList(4, (e2) => {
    a2('<div class="flex items-start bg-white p-6 shadow-md rounded-lg gap-4">'), a2(ssrRenderComponent(r2, { class: "h-[80px] w-[80px] rounded-md" }, null, i2)), a2('<div class="flex flex-col space-y-4 w-full">'), a2(ssrRenderComponent(r2, { class: "h-[24px] w-[150px]" }, null, i2)), a2(ssrRenderComponent(r2, { class: "h-[16px] w-[200px]" }, null, i2)), a2(ssrRenderComponent(r2, { class: "h-[14px] w-[250px]" }, null, i2)), a2(ssrRenderComponent(r2, { class: "h-[16px] w-[80px]" }, null, i2)), a2(ssrRenderComponent(r2, { class: "h-[16px] w-[120px]" }, null, i2)), a2("</div></div>");
  }), a2("<!--]--></div>");
}]]), k = { __name: "my-reviews", __ssrInlineRender: true, setup(e2) {
  Qs();
  const s2 = Qt().$axios, { data: v2, status: $2 } = wn("my-reviews", () => s2("review").then((e3) => e3.data).catch((e3) => e3)), y2 = ref(false), k2 = ref(null);
  return (e3, s3, a2, u2) => {
    var x2;
    const h2 = j, _2 = a, S = o;
    s3(`<div${ssrRenderAttrs(mergeProps({ class: "bg-[#F6F7FC] py-6 lg:py-10 px-2 lg:px-14 h-fit" }, u2))}><h3 class="font-bold text-3xl mb-12">${ssrInterpolate(e3.$t("TITLES.my_reviews"))}</h3>`), "pending" === unref($2) ? (s3("<div>"), s3(ssrRenderComponent(h2, null, null, a2)), s3("</div>")) : "success" === unref($2) ? (s3("<div>"), s3("<!---->"), unref(v2).data && unref(v2).data.length ? (s3('<div class="space-y-8 mt-10"><!--[-->'), ssrRenderList(null == (x2 = unref(v2)) ? undefined : x2.data, (t2, a3) => {
      var i2, o2;
      s3(`<div data-aos="fade-up" class="border flex gap-x-8 gap-y-6 bg-white border-[#E1E1E1] p-6"><div><img${ssrRenderAttr("src", null == (i2 = t2.image) ? undefined : i2.media)} alt="star" width="160" height="160" class="w-[160px] h-[160px] object-cover"></div><div class="w-full"><div class="flex items-center gap-2 justify-between mb-4"><p class="font-medium text-lg">${ssrInterpolate(t2.title)}</p></div>`), s3("<!---->"), s3(`<div class="flex items-center gap-2 justify-between mb-4"><div class="text-lg font-medium text-[##03030]">${ssrInterpolate(e3.$t("TITLES.price"))}: ${ssrInterpolate(e3.$n(+t2.price))} ${ssrInterpolate(e3.$t("TITLES.egp"))}</div><div class="flex items-center gap-1"><!--[-->`), ssrRenderList(5, (e4) => {
        s3('<span class="cursor-pointer flex-shrink-0 transition duration-300 hover:scale-110">'), e4 <= t2.rate ? s3(`<img${ssrRenderAttr("src", A)} alt="star" class="w-6 h-6">`) : s3(`<img${ssrRenderAttr("src", g)} alt="star" class="w-6 h-6">`), s3("</span>");
      }), s3("<!--]--></div></div>"), (null == (o2 = t2.images) ? undefined : o2.length) ? (s3('<div class="flex gap-4 mt-6 items-center flex-wrap"><!--[-->'), ssrRenderList(t2.images, (e4) => {
        s3(`<div class="relative group"><img${ssrRenderAttr("src", e4)} alt="star" width="120" height="120" class="w-[120px] h-[120px] object-cover"><button class="absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white p-3 opacity-0 transition-all group-hover:opacity-100 hover:bg-gray-100"><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path></svg></button></div>`);
      }), s3("<!--]--></div>")) : s3("<!---->"), s3("</div></div>");
    }), s3("<!--]--></div>")) : (s3("<div>"), s3(ssrRenderComponent(_2, { class: "!min-h-[300px]" }, null, a2)), s3("</div>")), s3("</div>")) : s3("<!---->"), ssrRenderTeleport(s3, (e4) => {
      unref(y2) ? e4(ssrRenderComponent(S, { onClose: (e5) => y2.value = false }, { default: withCtx((e5, s4, t2, a3) => {
        if (!s4) return [createVNode("img", { src: unref(k2), "data-aos": "zoom-in", "data-aos-duration": "800", alt: "review image", class: "max-h-[90%] max-w-[90%] object-cover" }, null, 8, ["src"])];
        s4(`<img${ssrRenderAttr("src", unref(k2))} data-aos="zoom-in" data-aos-duration="800" alt="review image" class="max-h-[90%] max-w-[90%] object-cover"${a3}>`);
      }), _: 1 }, a2)) : e4("<!---->");
    }, "body", false, a2), s3("</div>");
  };
} }, _ = k.setup;
k.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("pages/profile/my-reviews.vue"), _ ? _(e2, t2) : undefined;
};

export { k as default };
//# sourceMappingURL=my-reviews-BujpwNyf.mjs.map
