import { g } from './SvgIcon-YE_5uJaI.mjs';
import { i as Ma, u as Qt, d as gs, g as ws, _ as Ds } 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 F = { __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(i2, { emit: F2 }) {
  const h2 = i2;
  Ma(), Qt().$axios, gs();
  const E2 = ws(), I = computed(() => h2.selectedProducts.includes(h2.product.product_cart_id)), S = () => {
    Q("updateSelected", h2.product.product_cart_id);
  }, Q = F2;
  return (e2, r2, c2, o2) => {
    const l2 = g, F3 = Ds;
    i2.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]": I.value }] }, o2))}>`), i2.showAction ? (r2(`<!--[--><input type="checkbox"${ssrRenderAttr("name", `checked_${i2.product.product_cart_id}`)}${ssrRenderAttr("id", `id_${i2.product.product_cart_id}`)}${ssrRenderAttr("value", i2.product.product_cart_id)} class="hidden"${ssrIncludeBooleanAttr(Array.isArray(I.value) ? ssrLooseContain(I.value, i2.product.product_cart_id) : I.value) ? " checked" : ""}><span style="${ssrRenderStyle(I.value ? { display: "none" } : null)}" class="block size-[30px] border rounded-full border-primary cursor-pointer"></span>`), r2(ssrRenderComponent(l2, { style: I.value ? null : { display: "none" }, onClick: S, name: "checked", class: "cursor-pointer" }, null, c2)), r2("<!--]-->")) : r2("<!---->"), r2('<div class="flex-1 flex items-center gap-5">'), r2(ssrRenderComponent(F3, { to: unref(E2)(`/product/${i2.product.product_id}?color=${i2.product.color_id}&size=${i2.product.size_id}`), class: "block flex-shrink-0 relative z-0" }, { default: withCtx((t2, e3, r3, c3) => {
      var o3, d2, l3, u2, s2, a2, A2, g2, v2, x2;
      if (!e3) return [(null == (a2 = i2.product) ? undefined : a2.images) && (null == (g2 = null == (A2 = i2.product) ? undefined : A2.images) ? undefined : g2.length) ? (openBlock(), createBlock("img", { key: 0, src: null == (x2 = null == (v2 = i2.product) ? undefined : v2.images[0]) ? undefined : x2.media, alt: i2.product.title, class: "size-[128px] object-cover" }, null, 8, ["src", "alt"])) : createCommentVNode("", true)];
      (null == (o3 = i2.product) ? undefined : o3.images) && (null == (l3 = null == (d2 = i2.product) ? undefined : d2.images) ? undefined : l3.length) ? e3(`<img${ssrRenderAttr("src", null == (s2 = null == (u2 = i2.product) ? undefined : u2.images[0]) ? undefined : s2.media)}${ssrRenderAttr("alt", i2.product.title)} class="size-[128px] object-cover"${c3}>`) : e3("<!---->");
    }), _: 1 }, c2)), r2('<div class="space-y-6">'), r2(ssrRenderComponent(F3, { to: unref(E2)(`/product/${i2.product.product_id}?color=${i2.product.color_id}&size=${i2.product.size_id}`) }, { default: withCtx((t2, e3, r3, c3) => {
      if (!e3) return [createVNode("h3", { class: "text-primary font-medium line-clamp-1" }, toDisplayString(i2.product.title), 1)];
      e3(`<h3 class="text-primary font-medium line-clamp-1"${c3}>${ssrInterpolate(i2.product.title)}</h3>`);
    }), _: 1 }, c2)), r2(`<div class="flex text-[#797979] text-lg items-center gap-2"> Color : <span>${ssrInterpolate(i2.product.color)} x${ssrInterpolate(i2.product.quantity)}</span></div><div class="font-bold text-xl text-primary">`), i2.product.has_offer ? r2(`<div class="flex items-center gap-2"><p class="line-through text-desc">${ssrInterpolate(i2.product.price)} ${ssrInterpolate(i2.product.currency)}</p><p>${ssrInterpolate(i2.product.offer_price)} ${ssrInterpolate(i2.product.currency)}</p></div>`) : r2(`<p>${ssrInterpolate(i2.product.price)} ${ssrInterpolate(i2.product.currency)}</p>`), r2('</div></div></div><div class="flex-shrink-0 lg:ms-auto">'), "delivered" !== i2.status || i2.product.is_rated ? (r2("<div>"), i2.showAction ? (r2(`<div><div class="bg-[#F5F5F5] p-5 flex mb-4 lg:mb-10 items-center justify-center gap-4"><button${ssrIncludeBooleanAttr(i2.product.quantity <= 1) ? " disabled" : ""} class="disabled:opacity-30" type="button">`), r2(ssrRenderComponent(l2, { name: "minus-cirlce" }, null, c2)), r2(`</button><span class="font-medium text-2xl">${ssrInterpolate(i2.product.quantity)}</span><button type="button">`), r2(ssrRenderComponent(l2, { name: "add-circle" }, null, c2)), r2('</button></div><button type="button" class="w-fit block mx-auto">'), r2(ssrRenderComponent(l2, { name: "trash", class: "[&_path]:fill-[#EA4335]" }, null, c2)), r2("</button></div>")) : r2(`<div class="px-8 py-2 bg-[#F5F5F5] text-center text-2xl font-medium"> X ${ssrInterpolate(i2.product.quantity)}</div>`), r2("</div>")) : r2(ssrRenderComponent(F3, { to: unref(E2)(`/order/tracking-order/${e2.$route.params.slug}/review/${i2.product.product_id}?details=${i2.product.product_detail_id}`), class: "px-8 cursor-pointer py-2 text-[#C69C12] bg-[#FFFDF4] text-center text-xl font-medium" }, { default: withCtx((t2, r3, c3, o3) => {
      if (!r3) return [createTextVNode(toDisplayString(e2.$t("TITLES.rate_product")), 1)];
      r3(`${ssrInterpolate(e2.$t("TITLES.rate_product"))}`);
    }), _: 1 }, c2)), r2("</div></div>")) : r2("<!---->");
  };
} }, h = F.setup;
F.setup = (t2, e2) => {
  const r2 = useSSRContext();
  return (r2.modules || (r2.modules = /* @__PURE__ */ new Set())).add("components/Shared/ProductCart.vue"), h ? h(t2, e2) : undefined;
};
const E = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAgCAYAAABHA7voAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAb0SURBVHgBrVl5bBRVGP/ezGxbuke77LaF0kI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