import { h as Ma, a as Qt, b as Qs, i as wn, _ as An, g as $a, f as au, e as Zt, j as Fv } from './server.mjs';
import { g } from './SvgIcon-BKMVrGmr.mjs';
import { d } from './breadcrumb-LaEAX0us.mjs';
import { p } from './Modal-CVXpm7Mt.mjs';
import { ref, mergeProps, unref, withCtx, createVNode, useSSRContext, computed, resolveComponent, openBlock, createBlock, Fragment, renderList, createCommentVNode, toDisplayString, createTextVNode, watch, withModifiers } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrIncludeBooleanAttr, ssrInterpolate, ssrRenderStyle, ssrRenderTeleport } from 'vue/server-renderer';
import { p as pe } from './index-Dj5w-pp2.mjs';
import { useRouter } from 'vue-router';
import { q } from './BaseTextInput-DBWJA1sk.mjs';
import { A, g as g$1 } from './star-mqjJGHgV.mjs';
import * as O from 'yup';
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-rate';
import 'date-fns';
import '@hennge/vue3-pagination';
import 'axios';
import 'vue-social-sharing';
import './Backdrop-Ez8lg5QV.mjs';

const M = { __name: "BaseFileInput", __ssrInlineRender: true, props: { name: { type: String, required: true }, multiple: { type: Boolean, default: false }, initialValue: { type: [Array, String], default: null }, label: { type: String, default: null }, model: { type: String, default: null }, attachment: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, acceptedTypes: { type: String, default: "image/*,video/*,.pdf,.doc,.docx" }, custom: { type: Boolean, default: false } }, emits: ["loading"], setup(s2, { emit: i2 }) {
  const r2 = s2, d2 = Qt().$axios, { public: { baseGeneralURL: n2 } } = Zt();
  Qs();
  const u2 = Fv(r2.name), p2 = ref(null), E2 = ref({}), I2 = ref(null), P2 = ref(false), W2 = ref(0), q2 = ref(false);
  computed(() => {
    if (!E2.value.file) return null;
    const e2 = E2.value.file.type;
    return e2.startsWith("image/") ? "image" : e2.startsWith("video/") ? "video" : "other";
  });
  const D2 = () => {
    const e2 = p2.value.files;
    G2(e2);
  }, M2 = (e2) => {
    const t2 = e2.dataTransfer.files;
    G2(t2);
  }, G2 = async (e2) => {
    if (r2.multiple) {
      I2.value || (I2.value = []);
      for (let t2 of e2) if (r2.attachment) await X2(t2);
      else {
        const e3 = t2.type.startsWith("image/") ? "image" : t2.type.startsWith("video/") ? "video" : "file";
        I2.value.push({ id: "new-" + Math.random().toString().slice("2"), file: t2, src: URL.createObjectURL(t2), type: e3, str: null });
      }
      u2.setValue(I2.value);
    } else {
      const t2 = e2[0], a2 = t2.type.startsWith("image/") ? "image" : t2.type.startsWith("video/") ? "video" : "file";
      r2.attachment ? await X2(t2) : (u2.setValue(t2), E2.value = { id: "new-" + Math.random().toString().slice("2"), file: t2, src: URL.createObjectURL(t2), type: a2, str: null });
    }
  }, N2 = ref(false);
  useRouter();
  const X2 = async (e2) => {
    var t2, a2;
    N2.value = true, q2.value = true, W2.value = 0;
    const l2 = new FormData();
    l2.append("model", r2.model), e2.name.includes("mp4") ? l2.append("attachment_type", "video") : e2.name.includes("pdf") || e2.name.includes("docx") || e2.name.includes("doc") ? l2.append("attachment_type", "file") : l2.append("attachment_type", "image"), l2.append("file", e2);
    try {
      const t3 = await d2.post("attachments", l2, { baseURL: n2, onUploadProgress: (e3) => {
        W2.value = Math.round(100 * e3.loaded / e3.total);
      } }), a3 = e2.type.startsWith("image/") ? "image" : e2.type.startsWith("video/") ? "video" : "file";
      r2.multiple ? (I2.value.push({ id: "new-" + Math.random().toString().slice("2"), file: e2, src: URL.createObjectURL(e2), type: a3, str: t3.data.data }), u2.setValue(I2.value)) : (E2.value = { id: "new-" + Math.random().toString().slice("2"), file: e2, src: URL.createObjectURL(e2), type: a3, str: t3.data.data }, u2.setValue(E2.value));
    } catch (s3) {
      pe.error((null == (a2 = null == (t2 = s3.response) ? undefined : t2.data) ? undefined : a2.message) || "Upload failed");
    } finally {
      N2.value = false, q2.value = false, W2.value = 0;
    }
  }, Y2 = ref(null), H2 = ref(false), J = () => {
    var e2, t2;
    if (r2.attachment && !(null == (t2 = null == (e2 = Y2.value.id) ? undefined : e2.toString()) ? undefined : t2.includes("new"))) return a2 = Y2.value, q2.value = true, void d2.delete(`attachments/${a2.id}`, { baseURL: n2 }).then(() => {
      r2.multiple ? (I2.value = I2.value.filter((e3) => e3.id !== a2.id), u2.setValue(I2.value.length ? I2.value : null)) : (E2.value = {}, u2.setValue(null));
    }).catch((e3) => {
      var t3, a3;
      pe.error((null == (a3 = null == (t3 = e3.response) ? undefined : t3.data) ? undefined : a3.message) || "Failed to delete file");
    }).finally(() => {
      q2.value = false, H2.value = false;
    });
    var a2;
    r2.multiple ? (I2.value = I2.value.filter((e3) => e3.id !== Y2.value.id), u2.setValue(I2.value.length ? I2.value : null)) : (E2.value = {}, u2.setValue(null)), H2.value = false;
  };
  return watch(() => r2.initialValue, (e2) => {
    var t2, a2;
    e2 && (r2.multiple ? (I2.value = e2.map((e3) => {
      var t3, a3;
      return { id: e3.id, src: e3.media, file: null, str: null, type: (null == (t3 = e3.media) ? undefined : t3.includes("image")) ? "image" : (null == (a3 = e3.media) ? undefined : a3.includes("mp4")) ? "video" : "other" };
    }), u2.setValue(I2.value)) : (E2.value = { id: e2.id, src: e2.media, file: null, str: "", type: e2.type ? e2.type : (null == (t2 = e2.media) ? undefined : t2.includes("image")) ? "image" : (null == (a2 = e2.media) ? undefined : a2.includes("mp4")) ? "video" : "other" }, u2.setValue(E2.value)));
  }, { deep: true, immediate: true }), (e2, t2, a2, l2) => {
    const i3 = resolveComponent("veeField"), r3 = g, d3 = g, n3 = resolveComponent("VeeErrorMessage"), u3 = p;
    t2(`<div${ssrRenderAttrs(l2)}>`), t2(ssrRenderComponent(i3, { name: s2.name, type: "file" }, { default: withCtx(({ field: e3, meta: t3 }, a3, l3, i4) => {
      var o2, u4, c2, m2;
      if (!a3) return [s2.label ? (openBlock(), createBlock("label", { key: 0, class: "mb-1 hidden", for: s2.name }, toDisplayString(s2.label), 9, ["for"])) : createCommentVNode("", true), createVNode("div", { class: "input-file-wrapper" }, [!unref(E2).src && !(null == (c2 = unref(I2)) ? undefined : c2.length) > 0 ? (openBlock(), createBlock("label", { key: 0, for: s2.name, onDragover: withModifiers((e4) => P2.value = true, ["prevent"]), onDragleave: (e4) => P2.value = false, onDrop: withModifiers(M2, ["prevent"]) }, [createVNode("div", { class: "flex items-center justify-between w-full" }, [createVNode("div", { class: "flex items-center gap-2" }, [createVNode(r3, { name: "gallery-export", class: "text-primary" }), createVNode("p", null, toDisplayString(s2.label), 1)]), createVNode("div", null, [createVNode(d3, { name: "CTA" })])]), createVNode("input", { id: s2.name, type: "file", class: "hidden", ref_key: "fileInput", ref: p2, onChange: D2, multiple: s2.multiple, accept: s2.acceptedTypes, disabled: s2.disabled || unref(q2) }, null, 40, ["id", "multiple", "accept", "disabled"])], 40, ["for", "onDragover", "onDragleave"])) : createCommentVNode("", true), unref(E2).src ? (openBlock(), createBlock("div", { key: 1, class: ["relative p-6 border", s2.custom ? "" : "bg-white"] }, [createVNode("div", { class: "flex w-full items-center gap-2" }, ["image" === unref(E2).type ? (openBlock(), createBlock(r3, { key: 0, name: "image" })) : "video" === unref(E2).type ? (openBlock(), createBlock(r3, { key: 1, name: "video" })) : (openBlock(), createBlock(r3, { key: 2, name: "pdf" })), createVNode("span", null, toDisplayString(null == (m2 = unref(E2).file) ? undefined : m2.name), 1)]), createVNode("button", { onClick: (e4) => {
        Y2.value = unref(E2), H2.value = true;
      }, type: "button", class: "absolute end-2 top-2 flex size-6 items-center justify-center rounded-full" }, [createVNode(r3, { name: "xmark", class: "text-gray-500" })], 8, ["onClick"])], 2)) : createCommentVNode("", true)]), unref(W2) > 0 ? (openBlock(), createBlock("div", { key: 1, class: "mt-2 h-4 w-full rounded-full bg-gray-200" }, [createVNode("div", { class: "flex h-4 items-center justify-center bg-primary text-sm text-white", style: { width: `${unref(W2)}%` } }, toDisplayString(`${unref(W2)}%`), 5)])) : createCommentVNode("", true), createVNode(n3, { class: "text-sm text-red-500", name: s2.name }, null, 8, ["name"]), unref(I2) && unref(I2).length ? (openBlock(), createBlock("div", { key: 2 }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(I2), (e4, t4) => {
        var a4;
        return openBlock(), createBlock("div", { key: t4, class: ["relative mb-2 last:mb-0 p-6 border", s2.custom ? "" : "bg-white"] }, [createVNode("div", { class: "flex w-full items-center gap-2" }, ["image" === e4.type ? (openBlock(), createBlock(r3, { key: 0, name: "image" })) : "video" === e4.type ? (openBlock(), createBlock(r3, { key: 1, name: "video" })) : (openBlock(), createBlock(r3, { key: 2, name: "pdf" })), createVNode("span", null, toDisplayString(null == (a4 = e4.file) ? undefined : a4.name), 1)]), createVNode("button", { onClick: (t5) => {
          Y2.value = e4, H2.value = true;
        }, type: "button", class: "absolute end-2 top-2 flex size-6 items-center justify-center rounded-full" }, [createVNode(r3, { name: "xmark", class: "text-gray-500" })], 8, ["onClick"])], 2);
      }), 128))])) : createCommentVNode("", true)];
      s2.label ? a3(`<label class="mb-1 hidden"${ssrRenderAttr("for", s2.name)}${i4}>${ssrInterpolate(s2.label)}</label>`) : a3("<!---->"), a3(`<div class="input-file-wrapper"${i4}>`), !unref(E2).src && !(null == (o2 = unref(I2)) ? undefined : o2.length) > 0 ? (a3(`<label${ssrRenderAttr("for", s2.name)}${i4}><div class="flex items-center justify-between w-full"${i4}><div class="flex items-center gap-2"${i4}>`), a3(ssrRenderComponent(r3, { name: "gallery-export", class: "text-primary" }, null, l3, i4)), a3(`<p${i4}>${ssrInterpolate(s2.label)}</p></div><div${i4}>`), a3(ssrRenderComponent(d3, { name: "CTA" }, null, l3, i4)), a3(`</div></div><input${ssrRenderAttr("id", s2.name)} type="file" class="hidden"${ssrIncludeBooleanAttr(s2.multiple) ? " multiple" : ""}${ssrRenderAttr("accept", s2.acceptedTypes)}${ssrIncludeBooleanAttr(s2.disabled || unref(q2)) ? " disabled" : ""}${i4}></label>`)) : a3("<!---->"), unref(E2).src ? (a3(`<div class="${ssrRenderClass([s2.custom ? "" : "bg-white", "relative p-6 border"])}"${i4}><div class="flex w-full items-center gap-2"${i4}>`), "image" === unref(E2).type ? a3(ssrRenderComponent(r3, { name: "image" }, null, l3, i4)) : "video" === unref(E2).type ? a3(ssrRenderComponent(r3, { name: "video" }, null, l3, i4)) : a3(ssrRenderComponent(r3, { name: "pdf" }, null, l3, i4)), a3(`<span${i4}>${ssrInterpolate(null == (u4 = unref(E2).file) ? undefined : u4.name)}</span></div><button type="button" class="absolute end-2 top-2 flex size-6 items-center justify-center rounded-full"${i4}>`), a3(ssrRenderComponent(r3, { name: "xmark", class: "text-gray-500" }, null, l3, i4)), a3("</button></div>")) : a3("<!---->"), a3("</div>"), unref(W2) > 0 ? a3(`<div class="mt-2 h-4 w-full rounded-full bg-gray-200"${i4}><div class="flex h-4 items-center justify-center bg-primary text-sm text-white" style="${ssrRenderStyle({ width: `${unref(W2)}%` })}"${i4}>${ssrInterpolate(`${unref(W2)}%`)}</div></div>`) : a3("<!---->"), a3(ssrRenderComponent(n3, { class: "text-sm text-red-500", name: s2.name }, null, l3, i4)), unref(I2) && unref(I2).length ? (a3(`<div${i4}><!--[-->`), ssrRenderList(unref(I2), (e4, t4) => {
        var d4;
        a3(`<div class="${ssrRenderClass([s2.custom ? "" : "bg-white", "relative mb-2 last:mb-0 p-6 border"])}"${i4}><div class="flex w-full items-center gap-2"${i4}>`), "image" === e4.type ? a3(ssrRenderComponent(r3, { name: "image" }, null, l3, i4)) : "video" === e4.type ? a3(ssrRenderComponent(r3, { name: "video" }, null, l3, i4)) : a3(ssrRenderComponent(r3, { name: "pdf" }, null, l3, i4)), a3(`<span${i4}>${ssrInterpolate(null == (d4 = e4.file) ? undefined : d4.name)}</span></div><button type="button" class="absolute end-2 top-2 flex size-6 items-center justify-center rounded-full"${i4}>`), a3(ssrRenderComponent(r3, { name: "xmark", class: "text-gray-500" }, null, l3, i4)), a3("</button></div>");
      }), a3("<!--]--></div>")) : a3("<!---->");
    }), _: 1 }, a2)), ssrRenderTeleport(t2, (t3) => {
      unref(H2) ? t3(ssrRenderComponent(u3, { title: e2.$t("TITLES.delete_media") }, { default: withCtx((t4, a3, l3, s3) => {
        if (!a3) return [createVNode("span", { class: "p-text-secondary mb-5 block" }, toDisplayString(e2.$t("TEXTS.be_sure_of_this")), 1), createVNode("div", { class: "flex items-center justify-center gap-2" }, [createVNode("button", { type: "button", class: "base-btn-white !h-12 w-full", onClick: (e3) => H2.value = false }, toDisplayString(e2.$t("TITLES.cancel")), 9, ["onClick"]), createVNode("button", { type: "button", class: "base-btn !h-12 w-full", onClick: (e3) => J() }, toDisplayString(e2.$t("BUTTONS.confirm")), 9, ["onClick"])])];
        a3(`<span class="p-text-secondary mb-5 block"${s3}>${ssrInterpolate(e2.$t("TEXTS.be_sure_of_this"))}</span><div class="flex items-center justify-center gap-2"${s3}><button type="button" class="base-btn-white !h-12 w-full"${s3}>${ssrInterpolate(e2.$t("TITLES.cancel"))}</button><button type="button" class="base-btn !h-12 w-full"${s3}>${ssrInterpolate(e2.$t("BUTTONS.confirm"))}</button></div>`);
      }), _: 1 }, a2)) : t3("<!---->");
    }, "body", false, a2), t2("</div>");
  };
} }, G = M.setup;
M.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Inputs/BaseFileInput.vue"), G ? G(e2, t2) : undefined;
};
const N = { __name: "ProductFeedback", __ssrInlineRender: true, props: { data: { type: Object, required: true } }, setup(a2) {
  const l2 = a2, d2 = Qt().$axios, { t: n2 } = Qs(), u2 = Ma(), c2 = $a(), p2 = au(), f2 = ref(3), k2 = [n2("TITLES.small"), n2("TITLES.fit"), n2("TITLES.large")], C2 = ref(n2("TITLES.fit")), z2 = ref({}), O2 = O.object({ comment: O.string().required(n2("ERRORS.comment")), fileInput: O.mixed().required(n2("ERRORS.image")) }), G2 = computed(() => ["", n2("TITLES.poor"), n2("TITLES.fair"), n2("TITLES.good"), n2("TITLES.veryGood"), n2("TITLES.excellent")][f2.value]), N2 = (e2) => {
    const t2 = l2.data.products.find((e3) => e3.product_id == u2.params.id), a3 = new FormData();
    a3.append("order_id", u2.params.slug), a3.append("product_id", t2.product_id), a3.append("product_detail_id", t2.product_detail_id), a3.append("review", e2.comment), a3.append("rate", f2.value), a3.append("review_keys", C2.value.toLowerCase()), a3.append("image", e2.fileInput.str), d2("review", { method: "POST", data: a3 }).then((e3) => {
      setTimeout(() => {
        c2.push(p2(`/order/tracking-order/${u2.params.slug}`));
      }, 1e3), pe.success(e3.data.message);
    }).catch((e3) => {
      pe.error(e3.response.data.message);
    });
  };
  return (e2, t2, l3, s2) => {
    const i2 = resolveComponent("VeeForm"), r2 = g, d3 = M, n3 = q;
    t2(`<div${ssrRenderAttrs(mergeProps({ "data-aos": "fade-up", class: "max-w-[100%] w-[940px] mx-auto" }, s2))}>`), t2(ssrRenderComponent(i2, { "validation-schema": unref(O2), onSubmit: N2, initialValues: z2.value }, { default: withCtx((t3, l4, s3, i3) => {
      if (!l4) return [createVNode("div", { class: "space-y-8 mb-10 bg-[#F9F9F9] px-8 py-12" }, [(openBlock(true), createBlock(Fragment, null, renderList(a2.data.products, (t4, a3) => {
        var l5;
        return openBlock(), createBlock("div", { key: a3, class: ["flex items-center border bg-white border-[#E1E1E1] p-5 flex-wrap gap-5", e2.$route.params.id == t4.product_id ? "" : "opacity-50"] }, [createVNode("label", { class: "flex items-center gap-5 w-full" }, [createVNode("div", { class: "relative" }, [createVNode("input", { name: `product-${a3}`, checked: e2.$route.params.id == t4.product_id, type: "radio", class: "opacity-0 absolute h-6 w-6", disabled: "" }, null, 8, ["name", "checked"]), createVNode("div", { class: ["w-6 h-6 flex items-center justify-center border-[1.5px] rounded-full", e2.$route.params.id == t4.product_id ? "border-primary bg-black" : "border-primary"] }, [e2.$route.params.id == t4.product_id ? (openBlock(), createBlock(r2, { key: 0, name: "check", class: "flex-shrink-0 [&_path]:!fill-white" })) : createCommentVNode("", true)], 2)]), createVNode("div", { class: "flex-1 flex items-center gap-5" }, [createVNode("div", { class: "block flex-shrink-0 relative z-0" }, [createVNode("img", { src: null == (l5 = t4.images[0]) ? undefined : l5.media, alt: t4.title, class: "size-[128px] object-cover" }, null, 8, ["src", "alt"])]), createVNode("div", { class: "space-y-6" }, [createVNode("h3", { class: "text-primary font-medium line-clamp-1" }, toDisplayString(t4.title), 1), createVNode("div", { class: "flex text-[#797979] text-lg items-center gap-2" }, [createTextVNode(" Color: "), createVNode("span", null, toDisplayString(t4.color) + " x" + toDisplayString(t4.quantity), 1)]), createVNode("div", { class: "font-bold text-xl text-primary" }, toDisplayString(t4.price) + " EGP ", 1)])]), createVNode("div", { class: "flex-shrink-0 ms-auto" }, [createVNode("div", { class: "px-8 py-2 bg-[#F5F5F5] text-center text-2xl font-medium" }, " X " + toDisplayString(t4.quantity), 1)])])], 2);
      }), 128))]), createVNode("div", { class: "space-y-8 bg-[#F9F9F9] px-8 py-12" }, [createVNode("div", { class: "mb-4 flex items-center gap-2" }, [createVNode("span", { class: "text-primary font-medium" }, toDisplayString(e2.$t("TITLES.uploadImage")), 1)]), createVNode(d3, { name: "fileInput", label: e2.$t("TITLES.uploadImage"), modelValue: z2.value.uploadedFile, "onUpdate:modelValue": (e3) => z2.value.uploadedFile = e3, "accepted-types": "image/*", attachment: "", model: "reviews" }, null, 8, ["label", "modelValue", "onUpdate:modelValue"]), createVNode("div", { class: "space-y-2" }, [createVNode("div", { class: "text-primary font-medium" }, toDisplayString(e2.$t("TITLES.rateProduct")), 1), createVNode("div", { class: "flex items-center gap-2" }, [(openBlock(), createBlock(Fragment, null, renderList(5, (e3) => createVNode("span", { key: e3, class: "flex items-center gap-1 cursor-pointer transition duration-300 hover:scale-110", onClick: (t4) => {
        return a3 = e3, void (f2.value = a3);
        var a3;
      } }, [e3 <= f2.value ? (openBlock(), createBlock("img", { key: 0, src: A, alt: "star", class: "w-6 h-6 object-cover" })) : (openBlock(), createBlock("img", { key: 1, src: g$1, alt: "star", class: "w-6 h-6 object-cover" }))], 8, ["onClick"])), 64)), createVNode("span", { class: "ml-2 text-[#808080]" }, toDisplayString(G2.value), 1)])]), createVNode("div", { class: "space-y-2" }, [createVNode("div", { class: "text-primary font-medium" }, toDisplayString(e2.$t("TITLES.howWasTheSize")), 1), createVNode("div", { class: "flex items-center flex-wrap gap-6" }, [(openBlock(), createBlock(Fragment, null, renderList(k2, (e3) => createVNode("button", { key: e3, onClick: (t4) => ((e4) => {
        C2.value = e4;
      })(e3), class: ["px-3 flex-1 py-4 border", C2.value === e3 ? "border-primary bg-primary text-white" : "border-[#EAEAEA] text-[#808080] bg-white"], type: "button" }, toDisplayString(e3), 11, ["onClick"])), 64))])]), createVNode("div", { class: "space-y-2" }, [createVNode("div", { class: "text-primary font-medium" }, toDisplayString(e2.$t("TITLES.additional_comments")), 1), createVNode(n3, { name: "comment", type: "textarea", placeholder: e2.$t("TITLES.shareYourThoughtsAboutTheProduct"), value: z2.value.comment, "onUpdate:value": (e3) => z2.value.comment = e3 }, null, 8, ["placeholder", "value", "onUpdate:value"])]), createVNode("button", { type: "submit", class: "base-btn !w-full !h-16 !font-semibold" }, toDisplayString(e2.$t("TITLES.sendFeedback")), 1)])];
      l4(`<div class="space-y-8 mb-10 bg-[#F9F9F9] px-8 py-12"${i3}><!--[-->`), ssrRenderList(a2.data.products, (t4, a3) => {
        var d4;
        l4(`<div class="${ssrRenderClass([e2.$route.params.id == t4.product_id ? "" : "opacity-50", "flex items-center border bg-white border-[#E1E1E1] p-5 flex-wrap gap-5"])}"${i3}><label class="flex items-center gap-5 w-full"${i3}><div class="relative"${i3}><input${ssrRenderAttr("name", `product-${a3}`)}${ssrIncludeBooleanAttr(e2.$route.params.id == t4.product_id) ? " checked" : ""} type="radio" class="opacity-0 absolute h-6 w-6" disabled${i3}><div class="${ssrRenderClass([e2.$route.params.id == t4.product_id ? "border-primary bg-black" : "border-primary", "w-6 h-6 flex items-center justify-center border-[1.5px] rounded-full"])}"${i3}>`), e2.$route.params.id == t4.product_id ? l4(ssrRenderComponent(r2, { name: "check", class: "flex-shrink-0 [&_path]:!fill-white" }, null, s3, i3)) : l4("<!---->"), l4(`</div></div><div class="flex-1 flex items-center gap-5"${i3}><div class="block flex-shrink-0 relative z-0"${i3}><img${ssrRenderAttr("src", null == (d4 = t4.images[0]) ? undefined : d4.media)}${ssrRenderAttr("alt", t4.title)} class="size-[128px] object-cover"${i3}></div><div class="space-y-6"${i3}><h3 class="text-primary font-medium line-clamp-1"${i3}>${ssrInterpolate(t4.title)}</h3><div class="flex text-[#797979] text-lg items-center gap-2"${i3}> Color: <span${i3}>${ssrInterpolate(t4.color)} x${ssrInterpolate(t4.quantity)}</span></div><div class="font-bold text-xl text-primary"${i3}>${ssrInterpolate(t4.price)} EGP </div></div></div><div class="flex-shrink-0 ms-auto"${i3}><div class="px-8 py-2 bg-[#F5F5F5] text-center text-2xl font-medium"${i3}> X ${ssrInterpolate(t4.quantity)}</div></div></label></div>`);
      }), l4(`<!--]--></div><div class="space-y-8 bg-[#F9F9F9] px-8 py-12"${i3}><div class="mb-4 flex items-center gap-2"${i3}><span class="text-primary font-medium"${i3}>${ssrInterpolate(e2.$t("TITLES.uploadImage"))}</span></div>`), l4(ssrRenderComponent(d3, { name: "fileInput", label: e2.$t("TITLES.uploadImage"), modelValue: z2.value.uploadedFile, "onUpdate:modelValue": (e3) => z2.value.uploadedFile = e3, "accepted-types": "image/*", attachment: "", model: "reviews" }, null, s3, i3)), l4(`<div class="space-y-2"${i3}><div class="text-primary font-medium"${i3}>${ssrInterpolate(e2.$t("TITLES.rateProduct"))}</div><div class="flex items-center gap-2"${i3}><!--[-->`), ssrRenderList(5, (e3) => {
        l4(`<span class="flex items-center gap-1 cursor-pointer transition duration-300 hover:scale-110"${i3}>`), e3 <= f2.value ? l4(`<img${ssrRenderAttr("src", A)} alt="star" class="w-6 h-6 object-cover"${i3}>`) : l4(`<img${ssrRenderAttr("src", g$1)} alt="star" class="w-6 h-6 object-cover"${i3}>`), l4("</span>");
      }), l4(`<!--]--><span class="ml-2 text-[#808080]"${i3}>${ssrInterpolate(G2.value)}</span></div></div><div class="space-y-2"${i3}><div class="text-primary font-medium"${i3}>${ssrInterpolate(e2.$t("TITLES.howWasTheSize"))}</div><div class="flex items-center flex-wrap gap-6"${i3}><!--[-->`), ssrRenderList(k2, (e3) => {
        l4(`<button type="button" class="${ssrRenderClass([C2.value === e3 ? "border-primary bg-primary text-white" : "border-[#EAEAEA] text-[#808080] bg-white", "px-3 flex-1 py-4 border"])}"${i3}>${ssrInterpolate(e3)}</button>`);
      }), l4(`<!--]--></div></div><div class="space-y-2"${i3}><div class="text-primary font-medium"${i3}>${ssrInterpolate(e2.$t("TITLES.additional_comments"))}</div>`), l4(ssrRenderComponent(n3, { name: "comment", type: "textarea", placeholder: e2.$t("TITLES.shareYourThoughtsAboutTheProduct"), value: z2.value.comment, "onUpdate:value": (e3) => z2.value.comment = e3 }, null, s3, i3)), l4(`</div><button type="submit" class="base-btn !w-full !h-16 !font-semibold"${i3}>${ssrInterpolate(e2.$t("TITLES.sendFeedback"))}</button></div>`);
    }), _: 1 }, l3)), t2("</div>");
  };
} }, X = N.setup;
N.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Shared/ProductFeedback.vue"), X ? X(e2, t2) : undefined;
};
const Y = { __name: "[id]", __ssrInlineRender: true, setup(a2) {
  const l2 = Ma(), i2 = Qt().$axios, { t: r2 } = Qs(), c2 = ref([{ name: r2("NAV.home"), to: "/" }, { name: "Order details", to: `/order/tracking-order/${l2.params.slug}` }, { name: "Review", to: `/order/tracking-order/${l2.params.slug}/review`, disabled: true }]), { data: p2, status: v2, refresh: f2 } = wn("order-details", () => i2(`orders/${l2.params.slug}`).then((e2) => e2.data.data).catch((e2) => e2.response.data));
  return (e2, t2, a3, s2) => {
    const i3 = An, r3 = g, d2 = d, m2 = N;
    t2(`<div${ssrRenderAttrs(mergeProps({ class: "my-16 container" }, s2))}><div data-aos="fade-right" class="flex mb-14 items-center gap-5 flex-wrap">`), t2(ssrRenderComponent(i3, { to: e2.localePath(`/order/tracking-order/${unref(l2).params.slug}`), class: "justify-center flex items-center border border-[#E1E1E1] size-12 rounded-full" }, { default: withCtx((e3, t3, a4, l3) => {
      if (!t3) return [createVNode(r3, { name: "arrow-left", class: "[&_path]:fill-primary scale-[.60]" })];
      t3(ssrRenderComponent(r3, { name: "arrow-left", class: "[&_path]:fill-primary scale-[.60]" }, null, a4, l3));
    }), _: 1 }, a3)), t2(ssrRenderComponent(d2, { items: unref(c2) }, null, a3)), t2("</div>"), "success" == unref(v2) ? t2(ssrRenderComponent(m2, { class: "mb-20", data: unref(p2) }, null, a3)) : t2("<!---->"), t2("</div>");
  };
} }, H = Y.setup;
Y.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("pages/order/tracking-order/[slug]/review/[id].vue"), H ? H(e2, t2) : undefined;
};

export { Y as default };
//# sourceMappingURL=_id_-C0qxKEpT.mjs.map
