import { g } from './SvgIcon-BnUcaRsf.mjs';
import { h as Ma, a as Qt, b as Qs, f as au, _ as An } from './server.mjs';
import { useSSRContext, computed, mergeProps, unref, withCtx, openBlock, createBlock, createCommentVNode, createVNode, toDisplayString, createTextVNode } from 'vue';
import { ssrRenderAttrs, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrRenderStyle, ssrRenderComponent, ssrInterpolate } from 'vue/server-renderer';

const I = { __name: "ProductCart", __ssrInlineRender: true, props: { product: { type: Object, required: true }, showAction: { type: Boolean, required: false, default: true }, status: { type: String, required: false, default: "confirmed" }, selectedProducts: { type: Array, required: false, default: () => [] } }, emits: ["updateCart", "updateSelected"], setup(d2, { emit: I2 }) {
  const O2 = d2;
  Ma(), Qt().$axios, Qs();
  const h2 = au(), B2 = computed(() => O2.selectedProducts.includes(O2.product.product_cart_id)), S = () => {
    k("updateSelected", O2.product.product_cart_id);
  }, k = I2;
  return (e2, r2, o2, c2) => {
    const s2 = g, I3 = An;
    d2.product ? (r2(`<div${ssrRenderAttrs(mergeProps({ class: ["flex lg:items-center border bg-white border-[#E1E1E1] p-5 flex-wrap flex-col lg:flex-row gap-5", { "border-primary bg-[#FAFAFA]": B2.value }] }, c2))}>`), d2.showAction ? (r2(`<!--[--><input type="checkbox"${ssrRenderAttr("name", `checked_${d2.product.product_cart_id}`)}${ssrRenderAttr("id", `id_${d2.product.product_cart_id}`)}${ssrRenderAttr("value", d2.product.product_cart_id)} class="hidden"${ssrIncludeBooleanAttr(Array.isArray(B2.value) ? ssrLooseContain(B2.value, d2.product.product_cart_id) : B2.value) ? " checked" : ""}><span style="${ssrRenderStyle(B2.value ? { display: "none" } : null)}" class="block size-[30px] border rounded-full border-primary cursor-pointer"></span>`), r2(ssrRenderComponent(s2, { style: B2.value ? null : { display: "none" }, onClick: S, name: "checked", class: "cursor-pointer" }, null, o2)), r2("<!--]-->")) : r2("<!---->"), r2('<div class="flex-1 flex items-center gap-5">'), r2(ssrRenderComponent(I3, { to: unref(h2)(`/product/${d2.product.product_id}?color=${d2.product.color_id}&size=${d2.product.size_id}`), class: "block flex-shrink-0 relative z-0" }, { default: withCtx((t2, e3, r3, o3) => {
      var c3, i2, s3, l2, u2, a2, g2, m2, v2, x2;
      if (!e3) return [(null == (a2 = d2.product) ? undefined : a2.images) && (null == (m2 = null == (g2 = d2.product) ? undefined : g2.images) ? undefined : m2.length) ? (openBlock(), createBlock("img", { key: 0, src: null == (x2 = null == (v2 = d2.product) ? undefined : v2.images[0]) ? undefined : x2.media, alt: d2.product.title, class: "size-[128px] object-cover" }, null, 8, ["src", "alt"])) : createCommentVNode("", true)];
      (null == (c3 = d2.product) ? undefined : c3.images) && (null == (s3 = null == (i2 = d2.product) ? undefined : i2.images) ? undefined : s3.length) ? e3(`<img${ssrRenderAttr("src", null == (u2 = null == (l2 = d2.product) ? undefined : l2.images[0]) ? undefined : u2.media)}${ssrRenderAttr("alt", d2.product.title)} class="size-[128px] object-cover"${o3}>`) : e3("<!---->");
    }), _: 1 }, o2)), r2('<div class="space-y-6">'), r2(ssrRenderComponent(I3, { to: unref(h2)(`/product/${d2.product.product_id}?color=${d2.product.color_id}&size=${d2.product.size_id}`) }, { default: withCtx((t2, e3, r3, o3) => {
      if (!e3) return [createVNode("h3", { class: "text-primary font-medium line-clamp-1" }, toDisplayString(d2.product.title), 1)];
      e3(`<h3 class="text-primary font-medium line-clamp-1"${o3}>${ssrInterpolate(d2.product.title)}</h3>`);
    }), _: 1 }, o2)), r2(`<div class="flex text-[#797979] text-lg items-center gap-2"> Color : <span>${ssrInterpolate(d2.product.color)} x${ssrInterpolate(d2.product.quantity)}</span></div><div class="font-bold text-xl text-primary">`), d2.product.has_offer ? r2(`<div class="flex items-center gap-2"><p class="line-through text-desc">${ssrInterpolate(d2.product.price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</p><p>${ssrInterpolate(d2.product.offer_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</p></div>`) : r2(`<p>${ssrInterpolate(d2.product.price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</p>`), r2('</div></div></div><div class="flex-shrink-0 lg:ms-auto">'), "delivered" !== d2.status || d2.product.is_rated ? (r2("<div>"), d2.showAction ? (r2('<div><div class="bg-[#F5F5F5] p-5 flex mb-4 lg:mb-10 items-center justify-center gap-4"><button type="button">'), r2(ssrRenderComponent(s2, { name: "minus-cirlce" }, null, o2)), r2(`</button><span class="font-medium text-2xl">${ssrInterpolate(d2.product.quantity)}</span><button type="button">`), r2(ssrRenderComponent(s2, { name: "add-circle" }, null, o2)), r2('</button></div><button type="button" class="w-fit block mx-auto">'), r2(ssrRenderComponent(s2, { name: "trash", class: "[&_path]:fill-[#EA4335]" }, null, o2)), r2("</button></div>")) : r2(`<div class="px-8 py-2 bg-[#F5F5F5] text-center text-2xl font-medium"> X ${ssrInterpolate(d2.product.quantity)}</div>`), r2("</div>")) : r2(ssrRenderComponent(I3, { to: unref(h2)(`/order/tracking-order/${e2.$route.params.slug}/review/${d2.product.product_id}`), class: "px-8 cursor-pointer py-2 text-[#C69C12] bg-[#FFFDF4] text-center text-xl font-medium" }, { default: withCtx((t2, r3, o3, c3) => {
      if (!r3) return [createTextVNode(toDisplayString(e2.$t("TITLES.rate_product")), 1)];
      r3(`${ssrInterpolate(e2.$t("TITLES.rate_product"))}`);
    }), _: 1 }, o2)), r2("</div></div>")) : r2("<!---->");
  };
} }, O = I.setup;
I.setup = (t2, e2) => {
  const r2 = useSSRContext();
  return (r2.modules || (r2.modules = /* @__PURE__ */ new Set())).add("components/Shared/ProductCart.vue"), O ? O(t2, e2) : undefined;
};
const h = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAgCAYAAABHA7voAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAb0SURBVHgBrVl5bBRVGP/ezGxbuke77LaF0kI5a7gKgomUU4mcKl4gwZsYSwiEQ/hH0Cj2D1QSiCB4ACEg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