import { u as ef, e as Zt, h as Ma, a as Qt, b as Qs, i as wn, _ as An } from './server.mjs';
import { g } from './SvgIcon-BKMVrGmr.mjs';
import { d } from './breadcrumb-gjE702oE.mjs';
import { N, j } from './AddressCard-vIT-U_Ht.mjs';
import { h, B, I } from './Cash-DwDXLJQi.mjs';
import { a } from './NoData-DiE8X5YK.mjs';
import { ref, watch, resolveComponent, mergeProps, withCtx, createVNode, unref, isRef, withModifiers, toDisplayString, withDirectives, vModelCheckbox, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrLooseContain, ssrRenderClass, ssrLooseEqual } from 'vue/server-renderer';
import { A } from './visa-YBBZ6mho.mjs';
import { o } from './Backdrop-Ez8lg5QV.mjs';
import { S } from './BaseSelectInput-BN7ZmvIw.mjs';
import { q } from './BaseTextInput-DBWJA1sk.mjs';
import { B as B$1 } from './BasePhoneInput-BHlnMg14.mjs';
import { l } from './Success-CPwGoGGk.mjs';
import { p as pe } from './index-Dj5w-pp2.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-router';
import 'vue-rate';
import 'date-fns';
import '@hennge/vue3-pagination';
import 'axios';
import 'vue-social-sharing';
import '@headlessui/vue';
import './Modal-CVXpm7Mt.mjs';

const G = { __name: "PaymentMethods", __ssrInlineRender: true, props: { value: { type: String, required: true } }, emits: ["update:value"], setup(e2, { emit: t2 }) {
  const a2 = ref(e2.value);
  watch(a2, (e3) => {
    l2("update:value", e3);
  });
  const l2 = t2;
  return (e3, t3, l3, s2) => {
    const d2 = g;
    t3(`<div${ssrRenderAttrs(mergeProps({ class: "p-4 lg:p-8 bg-[#F9F9F9]" }, s2))}><h2 class="font-bold text-xl xl:text-2xl mb-8">${ssrInterpolate(e3.$t("TITLES.payment_method"))}</h2><div class="space-y-8"><div class="${ssrRenderClass(["online" === unref(a2) ? "border-[#707070]" : "border-[#E1E1E1]", "border p-5 bg-white cursor-pointer transition-all"])}"><label class="flex items-center w-full cursor-pointer"><div class="relative me-5"><input type="radio" name="payment" value="online"${ssrIncludeBooleanAttr(ssrLooseEqual(unref(a2), "online")) ? " checked" : ""} class="opacity-0 absolute h-6 w-6 cursor-pointer"><div class="${ssrRenderClass(["online" === unref(a2) ? "border-primary" : "border-[#E1E1E1]", "w-6 h-6 border-[1.5px] rounded-full"])}">`), "online" === unref(a2) ? t3('<div class="w-4 h-4 bg-primary rounded-full absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"></div>') : t3("<!---->"), t3(`</div></div><span class="flex-grow text-primary">${ssrInterpolate(e3.$t("TITLES.online_payment"))}</span><div class="flex items-center gap-5"><div class="lg:w-[112px] h-[56px] w-[80px] flex items-center justify-center bg-[#F5F5F5]"><img${ssrRenderAttr("src", h)} alt="mastercard"></div><div class="lg:w-[112px] h-[56px] w-[80px] flex items-center justify-center bg-[#F5F5F5]"><img${ssrRenderAttr("src", A)} alt="visa"></div></div></label></div><div class="${ssrRenderClass(["wallet" === unref(a2) ? "border-[#707070]" : "border-[#E1E1E1]", "border p-5 bg-white cursor-pointer transition-all"])}"><label class="flex items-center w-full cursor-pointer"><div class="relative me-5"><input type="radio" name="payment" value="wallet"${ssrIncludeBooleanAttr(ssrLooseEqual(unref(a2), "wallet")) ? " checked" : ""} class="opacity-0 absolute h-6 w-6 cursor-pointer"><div class="${ssrRenderClass(["wallet" === unref(a2) ? "border-primary" : "border-[#E1E1E1]", "w-6 h-6 border-[1.5px] rounded-full"])}">`), "wallet" === unref(a2) ? t3('<div class="w-4 h-4 bg-primary rounded-full absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"></div>') : t3("<!---->"), t3(`</div></div><span class="flex-grow text-primary">${ssrInterpolate(e3.$t("TITLES.wallet"))}</span><div class="lg:w-[112px] h-[56px] w-[80px] flex items-center justify-center bg-[#F5F5F5]">`), t3(ssrRenderComponent(d2, { name: "wallet" }, null, l3)), t3(`</div></label></div><div class="${ssrRenderClass(["cash" === unref(a2) ? "border-[#707070]" : "border-[#E1E1E1]", "border p-5 bg-white cursor-pointer transition-all"])}"><label class="flex items-center w-full cursor-pointer"><div class="relative me-5"><input type="radio" name="payment" value="cash"${ssrIncludeBooleanAttr(ssrLooseEqual(unref(a2), "cash")) ? " checked" : ""} class="opacity-0 absolute h-6 w-6 cursor-pointer"><div class="${ssrRenderClass(["cash" === unref(a2) ? "border-primary" : "border-[#E1E1E1]", "w-6 h-6 border-[1.5px] rounded-full"])}">`), "cash" === unref(a2) ? t3('<div class="w-4 h-4 bg-primary rounded-full absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"></div>') : t3("<!---->"), t3(`</div></div><span class="flex-grow text-primary">${ssrInterpolate(e3.$t("TITLES.cash_on_delivery"))}</span><div class="lg:w-[112px] h-[56px] w-[80px] flex items-center justify-center bg-[#F5F5F5]"><div><img${ssrRenderAttr("src", B)} alt="Cash" class="mx-auto"><p class="text-[#339966] font-semibold"> Cash </p></div></div></label></div></div></div>`);
  };
} }, Y = G.setup;
G.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Shared/PaymentMethods.vue"), Y ? Y(e2, t2) : undefined;
};
const Q = "data:image/png;base64, ", K = { __name: "index", __ssrInlineRender: true, setup(b2) {
  const I2 = ef(), { public: { baseGeneralURL: C2 } } = Zt(), Y2 = Ma(), K2 = ref(false), H2 = ref({ country: null, city: null, state: null, saveForLater: false }), X = ref(false), W = ref(false), Z = Qt().$axios, { t: ee } = Qs(), te = O.object().shape({ country: O.object().required(ee("ERRORS.country")), state: O.object().required(ee("ERRORS.state")), city: O.object().required(ee("ERRORS.city")), name: O.string().required(ee("ERRORS.name")), last_name: O.string().required(ee("ERRORS.last_name")), address: O.object().required(ee("ERRORS.address")), zip_code: O.string().required(ee("ERRORS.zip_code")), phone: O.object().shape({ phone_number: O.string().required(ee("ERRORS.phone")).test("phone-length", function(e2) {
    const { phone_limit: t2 } = this.parent;
    return !!e2 && (e2.length === t2 || this.createError({ message: ee("ERRORS.phone_limit", { phone_limit: t2 }) }));
  }), phone_code: O.string().required(ee("ERRORS.phone_code")) }) }), ae = ref([]), le = ref([]);
  watch(() => H2.value.country, (e2) => {
    e2 ? (async (e3) => {
      Z(`get_country_states/${e3}`, { method: "GET", baseURL: C2 }).then((e4) => {
        ae.value = e4.data.data;
      }).catch((e4) => {
      });
    })(e2.id) : (ae.value = [], le.value = []);
  }, { deep: true, immediate: true }), watch(() => H2.value.state, (e2) => {
    e2 ? (async (e3) => {
      Z(`get_state_cities/${e3}`, { method: "GET", baseURL: C2 }).then((e4) => {
        le.value = e4.data.data;
      }).catch((e4) => {
      });
    })(e2.id) : le.value = [];
  }, { deep: true, immediate: true });
  const se = async (e2) => {
    W.value = true;
    const t2 = new FormData();
    t2.append("country_id", e2.country.id), t2.append("state_id", e2.state.id), t2.append("city_id", e2.city.id), t2.append("first_name", e2.name), t2.append("last_name", e2.last_name), t2.append("phone", e2.phone.phone_number), t2.append("phone_code", e2.phone.phone_code), t2.append("street_address", e2.address.location), t2.append("lat", e2.address.lat), t2.append("lng", e2.address.lng), t2.append("zip_code", e2.zip_code), t2.append("is_default", +H2.value.saveForLater);
    try {
      await Z("address", { method: "POST", data: t2 }), X.value = true, K2.value = false, ne();
    } catch (a2) {
      pe.error(a2.response.data.message);
    } finally {
      W.value = false;
    }
  }, de = ref([{ name: ee("NAV.home"), to: "/" }, { name: ee("TITLES.confirm_order"), to: "", disabled: true }, { name: ee("TITLES.payment"), to: "/order/payment", disabled: true }]), oe = ref(false), { data: re, status: ie, refresh: ne } = wn("addresses", () => Z("address").then((e2) => e2.data.data).catch((e2) => e2.response.data)), ce = ref(null);
  watch(() => re.value, (e2) => {
    var t2;
    (null == e2 ? undefined : e2.length) && (ce.value = null == (t2 = null == e2 ? undefined : e2.find((e3) => e3.is_default)) ? undefined : t2.id);
  }, { deep: true, immediate: true });
  const { data: pe$1, status: ue, refresh: ve } = wn("cart", () => (() => {
    var e2, t2, a2, l2;
    const s2 = new URLSearchParams();
    return (null == (e2 = Y2.query) ? undefined : e2.selected) && ("string" == typeof (null == (t2 = Y2.query) ? undefined : t2.selected) ? s2.append("product_cart_ids[0]", null == (a2 = Y2.query) ? undefined : a2.selected) : null == (l2 = Y2.query) || l2.selected.map((e3, t3) => {
      s2.append(`product_cart_ids[${t3}]`, e3);
    })), Z("cart", { params: s2 }).then((e3) => e3.data).catch((e3) => e3.response.data);
  })()), me = ref([]);
  watch(() => pe$1.value, (e2) => {
    var t2, a2;
    (null == (a2 = null == (t2 = null == e2 ? undefined : e2.data) ? undefined : t2.items) ? undefined : a2.length) && (Y2.query.selected ? me.value = e2.data.items.filter((e3) => Y2.query.selected.includes(e3.product_cart_id.toString())) : me.value = e2.data.items);
  }, { deep: true, immediate: true });
  const be = ref(null), he = ref("online"), xe = ref(""), fe = ref(null);
  return (e2, t2, a2, l2) => {
    var _a;
    var s2, o2, b3, h2, x2, C3, J2, O2;
    const Y3 = An, Z2 = g, ie2 = d, ue2 = N, ve2 = I, ge = a, ye = G, Le = o, $e = resolveComponent("VeeForm"), Ee = S, Se = q, Te = B$1, we = j, Ae = l;
    t2(`<div${ssrRenderAttrs(mergeProps({ class: "my-16 container" }, l2))}><div data-aos="fade-right" class="flex mb-10 items-center gap-5 flex-wrap">`), t2(ssrRenderComponent(Y3, { to: e2.localePath("/cart"), class: "justify-center flex items-center border border-[#E1E1E1] size-12 rounded-full" }, { default: withCtx((e3, t3, a3, l3) => {
      if (!t3) return [createVNode(Z2, { name: "arrow-left", class: "[&_path]:fill-primary scale-[.60]" })];
      t3(ssrRenderComponent(Z2, { name: "arrow-left", class: "[&_path]:fill-primary scale-[.60]" }, null, a3, l3));
    }), _: 1 }, a2)), t2(ssrRenderComponent(ie2, { items: unref(de) }, null, a2)), t2(`</div><div class="grid grid-cols-1 lg:grid-cols-12 gap-6 lg:gap-4 xl:gap-10"><div data-aos="fade-right" class="lg:col-span-8 space-y-10"><div class="p-4 lg:p-8 bg-[#F9F9F9] mb-6 space-y-6"><h3 class="font-bold text-xl xl:text-2xl mb-6">${ssrInterpolate(unref(ee)("TITLES.address"))}</h3><!--[-->`), ssrRenderList(unref(re), (e3) => {
      t2(ssrRenderComponent(ue2, { key: e3.id, address: e3, checkout: "", onUpdated: unref(ne), value: unref(ce), "onUpdate:value": (e4) => isRef(ce) ? ce.value = e4 : null }, null, a2));
    }), t2(`<!--]--><button class="base-btn w-full font-semibold mt-8 !h-16">${ssrInterpolate(e2.$t("TITLES.add_new_address"))}</button></div><div class="p-4 lg:p-8 bg-[#F9F9F9]"><h2 class="font-bold text-xl xl:text-2xl mb-8">${ssrInterpolate(unref(ee)("TITLES.order_details"))}</h2>`), unref(me).length ? (t2('<div class="space-y-8"><!--[-->'), ssrRenderList(unref(me), (e3) => {
      t2(ssrRenderComponent(ve2, { key: e3.id, product: e3, "show-action": false }, null, a2));
    }), t2("<!--]--></div>")) : (t2("<div>"), t2(ssrRenderComponent(ge, { class: "!min-h-[100px]" }, null, a2)), t2("</div>")), t2("</div>"), t2(ssrRenderComponent(ye, { value: unref(he), "onUpdate:value": (e3) => isRef(he) ? he.value = e3 : null }, null, a2)), t2(`</div><div data-aos="fade-left" class="lg:col-span-4"><div class="bg-[#F9F9F9] px-6 pt-6 mb-10 pb-10"><h3 class="font-bold text-xl xl:text-2xl mb-6">${ssrInterpolate(e2.$t("TITLES.order_summary"))}</h3><div class="border mb-6 border-[#E4E7ED0] p-4"><div class="flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between"><h4>${ssrInterpolate(e2.$t("TITLES.sub_total"))}</h4>`), (null == (s2 = unref(be)) ? undefined : s2.sub_total) ? t2(`<div class="font-bold xl:text-xl"><span class="line-through text-desc">${ssrInterpolate(unref(pe$1).sub_total)}</span> ${ssrInterpolate(null == (o2 = unref(be)) ? undefined : o2.sub_total)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`) : t2(`<div class="font-bold xl:text-xl">${ssrInterpolate(unref(pe$1).sub_total)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`), t2(`</div><div class="flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between"><h4>${ssrInterpolate(e2.$t("TITLES.vat_price"))}</h4>`), (null == (b3 = unref(be)) ? undefined : b3.vat_price) ? t2(`<div class="font-bold xl:text-xl"><span class="line-through text-desc">${ssrInterpolate(unref(pe$1).vat_price)}</span> ${ssrInterpolate(null == (h2 = unref(be)) ? undefined : h2.vat_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`) : t2(`<div class="font-bold xl:text-xl">${ssrInterpolate(unref(pe$1).vat_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`), t2(`</div><div class="flex font-medium text-lg mb-4 items-center gap-4 justify-between pb-4 border-b-[1.5px] border-dashed border-[#D7D7E0]"><h4 class="text-[#797979]">${ssrInterpolate(e2.$t("TITLES.shipping"))} :</h4><div class="xl:text-xl">${ssrInterpolate((_a = unref(pe$1).shipping) != null ? _a : 0)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div></div><div class="flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between"><h4>${ssrInterpolate(e2.$t("TITLES.total_price"))}</h4>`), (null == (x2 = unref(be)) ? undefined : x2.total_price) ? t2(`<div class="font-bold xl:text-xl"><span class="line-through text-desc">${ssrInterpolate(unref(pe$1).total_price)}</span> ${ssrInterpolate(null == (C3 = unref(be)) ? undefined : C3.total_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`) : t2(`<div class="font-bold xl:text-xl">${ssrInterpolate(unref(pe$1).total_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`), t2(`</div></div><button${ssrIncludeBooleanAttr(!unref(me).length) ? " disabled" : ""} class="base-btn w-full">${ssrInterpolate(unref(ee)("TITLES.confirm_order"))}</button></div><div class="bg-[#F9F9F9] p-6"><h3 class="font-bold text-xl xl:text-2xl mb-6">${ssrInterpolate(unref(ee)("TITLES.our_payment_methods"))}</h3><div class="flex items-center justify-center gap-6"><div class="w-[112px] h-[56px] flex items-center justify-center bg-white"><img${ssrRenderAttr("src", h)} alt="mastercard"></div><div class="w-[112px] h-[56px] flex items-center justify-center bg-white"><img${ssrRenderAttr("src", A)} alt="visa"></div><div class="w-[112px] h-[56px] flex items-center justify-center bg-white flex-col"><img${ssrRenderAttr("src", B)} alt="Cash" class="mx-auto"><p class="text-[#339966] font-semibold">Cash</p></div></div></div><form class="mt-10"><h3 class="font-bold text-xl xl:text-2xl mb-4">${ssrInterpolate(e2.$t("TITLES.promo_code"))}</h3><div class="border gap-4 xl:gap-4 lg:gap-2 border-[#E1E1E1] p-4 flex items-center"><div class="rounded-full flex-shrink-0 flex items-center justify-center bg-[#FDF7F1] size-12">`), t2(ssrRenderComponent(Z2, { name: "discount-shape" }, null, a2)), t2(`</div><input id="couponInput" type="text" class="border-none w-full outline-none xl:text-lg lg:text-sm text-lg placeholder:text-[#606060]"${ssrRenderAttr("placeholder", e2.$t("TITLES.enter_discount_code"))}${ssrRenderAttr("value", unref(xe))}>`), (null == (J2 = unref(be)) ? undefined : J2.total_price) ? (t2('<button class="size-6 flex items-center justify-center rounded-full" type="button">'), t2(ssrRenderComponent(Z2, { name: "xmark" }, null, a2)), t2("</button>")) : t2(`<button${ssrIncludeBooleanAttr(!unref(xe) && !(null == (O2 = unref(be)) ? undefined : O2.data)) ? " disabled" : ""} class="bg-primary text-sm xl:text-base disabled:opacity-70 disabled:cursor-not-allowed transition-all duration-300 hover:bg-opacity-80 ms-auto text-white flex-shrink-0 py-2 font-semibold px-6 rounded-full" type="submit">${ssrInterpolate(unref(ee)("TITLES.apply"))}</button>`), t2("</div></form></div></div>"), ssrRenderTeleport(t2, (t3) => {
      unref(oe) ? t3(ssrRenderComponent(Le, null, { default: withCtx((t4, a3, l3, s3) => {
        var d2, o3, r2, i2, n2, c2, p2, u2;
        if (!a3) return [createVNode("div", { onClick: withModifiers(() => {
        }, ["stop"]), class: "bg-white w-[760px] max-h-[95%] overflow-y-auto max-w-[90%] p-12", "data-aos": "zoom-in", "data-aos-duration": "800" }, [createVNode("div", { class: "relative" }, [createVNode("h4", { class: "text-3xl capitalize text-center mb-10 font-bold" }, toDisplayString(unref(ee)("TITLES.thanks_for_shopping")), 1)]), createVNode("div", { class: "pb-6 border-b-2 border-opacity-30 border-[#909EAC]" }, [createVNode("img", { src: Q, alt: "big-check", class: "mx-auto mb-10" }), createVNode("p", { class: "text-[#707377] mx-auto text-center w-[394px] xl:text-xl max-w-[100%]" }, toDisplayString(unref(ee)("TITLES.order_confirmation_sent")), 1)]), createVNode("div", { class: "space-y-6 capitalize mt-6 mb-6" }, [createVNode("div", { class: "flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between" }, [createVNode("h4", null, toDisplayString(unref(ee)("TITLES.items_ordered")), 1), createVNode("div", { class: "font-bold xl:text-xl" }, toDisplayString(null == (n2 = unref(fe)) ? undefined : n2.count), 1)]), createVNode("div", { class: "flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between" }, [createVNode("h4", null, toDisplayString(unref(ee)("TITLES.total")), 1), createVNode("div", { class: "font-bold xl:text-xl" }, toDisplayString(null == (c2 = unref(fe)) ? undefined : c2.total) + " " + toDisplayString(e2.$t("TITLES.egp")), 1)]), createVNode("div", { class: "flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between" }, [createVNode("h4", null, toDisplayString(unref(ee)("TITLES.delivery_date")), 1), createVNode("div", { class: "font-bold xl:text-xl" }, "05:30 - 05:30 PM")]), createVNode("div", { class: "text-center xl:text-xl" }, toDisplayString(unref(ee)("TITLES.order")) + " #" + toDisplayString(null == (p2 = unref(fe)) ? undefined : p2.order_no), 1)]), createVNode(Y3, { to: e2.localePath(`/order/tracking-order/${null == (u2 = unref(fe)) ? undefined : u2.id}`), class: "block w-full" }, { default: withCtx(() => [createVNode("button", { class: "base-btn w-full capitalize mb-6 !h-14" }, toDisplayString(unref(ee)("TITLES.track_your_order")), 1)]), _: 1 }, 8, ["to"]), createVNode(Y3, { to: e2.localePath("/"), class: "block w-full" }, { default: withCtx(() => [createVNode("button", { class: "base-btn w-full !bg-white border !text-primary !border-primary capitalize !h-14" }, toDisplayString(unref(ee)("TITLES.continue_shopping")), 1)]), _: 1 }, 8, ["to"])], 8, ["onClick"])];
        a3(`<div class="bg-white w-[760px] max-h-[95%] overflow-y-auto max-w-[90%] p-12" data-aos="zoom-in" data-aos-duration="800"${s3}><div class="relative"${s3}><h4 class="text-3xl capitalize text-center mb-10 font-bold"${s3}>${ssrInterpolate(unref(ee)("TITLES.thanks_for_shopping"))}</h4></div><div class="pb-6 border-b-2 border-opacity-30 border-[#909EAC]"${s3}><img${ssrRenderAttr("src", Q)} alt="big-check" class="mx-auto mb-10"${s3}><p class="text-[#707377] mx-auto text-center w-[394px] xl:text-xl max-w-[100%]"${s3}>${ssrInterpolate(unref(ee)("TITLES.order_confirmation_sent"))}</p></div><div class="space-y-6 capitalize mt-6 mb-6"${s3}><div class="flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between"${s3}><h4${s3}>${ssrInterpolate(unref(ee)("TITLES.items_ordered"))}</h4><div class="font-bold xl:text-xl"${s3}>${ssrInterpolate(null == (d2 = unref(fe)) ? undefined : d2.count)}</div></div><div class="flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between"${s3}><h4${s3}>${ssrInterpolate(unref(ee)("TITLES.total"))}</h4><div class="font-bold xl:text-xl"${s3}>${ssrInterpolate(null == (o3 = unref(fe)) ? undefined : o3.total)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div></div><div class="flex font-semibold xl:text-xl mb-4 items-center gap-4 justify-between"${s3}><h4${s3}>${ssrInterpolate(unref(ee)("TITLES.delivery_date"))}</h4><div class="font-bold xl:text-xl"${s3}>05:30 - 05:30 PM</div></div><div class="text-center xl:text-xl"${s3}>${ssrInterpolate(unref(ee)("TITLES.order"))} #${ssrInterpolate(null == (r2 = unref(fe)) ? undefined : r2.order_no)}</div></div>`), a3(ssrRenderComponent(Y3, { to: e2.localePath(`/order/tracking-order/${null == (i2 = unref(fe)) ? undefined : i2.id}`), class: "block w-full" }, { default: withCtx((e3, t5, a4, l4) => {
          if (!t5) return [createVNode("button", { class: "base-btn w-full capitalize mb-6 !h-14" }, toDisplayString(unref(ee)("TITLES.track_your_order")), 1)];
          t5(`<button class="base-btn w-full capitalize mb-6 !h-14"${l4}>${ssrInterpolate(unref(ee)("TITLES.track_your_order"))}</button>`);
        }), _: 1 }, l3, s3)), a3(ssrRenderComponent(Y3, { to: e2.localePath("/"), class: "block w-full" }, { default: withCtx((e3, t5, a4, l4) => {
          if (!t5) return [createVNode("button", { class: "base-btn w-full !bg-white border !text-primary !border-primary capitalize !h-14" }, toDisplayString(unref(ee)("TITLES.continue_shopping")), 1)];
          t5(`<button class="base-btn w-full !bg-white border !text-primary !border-primary capitalize !h-14"${l4}>${ssrInterpolate(unref(ee)("TITLES.continue_shopping"))}</button>`);
        }), _: 1 }, l3, s3)), a3("</div>");
      }), _: 1 }, a2)) : t3("<!---->");
    }, "body", false, a2), ssrRenderTeleport(t2, (t3) => {
      unref(K2) ? t3(ssrRenderComponent(Le, { class: "!z-[999999999]", onClose: (e3) => K2.value = false }, { default: withCtx((t4, a3, l3, s3) => {
        if (!a3) return [createVNode("div", { onClick: withModifiers(() => {
        }, ["stop"]), class: "bg-white max-h-[95%] w-[800px] overflow-y-auto p-4 lg:p-12", "data-aos": "zoom-in", "data-aos-duration": "800" }, [createVNode("div", { class: "relative" }, [createVNode("h4", { class: "text-xl lg:text-3xl text-center mb-10 font-bold" }, toDisplayString(e2.$t("TITLES.add_new_address")), 1), 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: (e3) => K2.value = false }, [createVNode(Z2, { name: "close-2" })], 8, ["onClick"])]), createVNode($e, { "validation-schema": unref(te), onSubmit: se, initialValues: unref(H2) }, { default: withCtx(() => [createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Ee, { name: "country", label: e2.$t("LABELS.country"), placeholder: e2.$t("INPUTS.country"), value: unref(H2).country, "onUpdate:value": (e3) => unref(H2).country = e3, items: unref(I2).countries }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", null, [createVNode(Ee, { name: "state", label: e2.$t("LABELS.state"), placeholder: e2.$t("INPUTS.state"), value: unref(H2).state, "onUpdate:value": (e3) => unref(H2).state = e3, items: unref(ae) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])])]), createVNode("div", { class: "mb-6" }, [createVNode(Ee, { name: "city", label: e2.$t("LABELS.city"), placeholder: e2.$t("INPUTS.city"), value: unref(H2).city, "onUpdate:value": (e3) => unref(H2).city = e3, items: unref(le) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Se, { name: "name", label: e2.$t("LABELS.name"), placeholder: e2.$t("INPUTS.name"), type: "text", value: unref(H2).name, "onUpdate:value": (e3) => unref(H2).name = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", null, [createVNode(Se, { name: "last_name", label: e2.$t("LABELS.last_name"), placeholder: e2.$t("INPUTS.last_name"), type: "text", value: unref(H2).last_name, "onUpdate:value": (e3) => unref(H2).last_name = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])])]), createVNode("div", { class: "mb-6" }, [createVNode(Te, { name: "phone", label: e2.$t("LABELS.phone"), placeholder: e2.$t("INPUTS.phone"), value: unref(H2).phone, "onUpdate:value": (e3) => unref(H2).phone = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(we, { name: "address", label: e2.$t("LABELS.address"), placeholder: e2.$t("INPUTS.address"), value: unref(H2).address, "onUpdate:value": (e3) => unref(H2).address = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(Se, { name: "zip_code", label: e2.$t("LABELS.zip_code"), placeholder: e2.$t("INPUTS.zip_code"), type: "text", value: unref(H2).zip_code, "onUpdate:value": (e3) => unref(H2).zip_code = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6 flex items-center" }, [withDirectives(createVNode("input", { type: "checkbox", id: "saveForLater", "onUpdate:modelValue": (e3) => unref(H2).saveForLater = e3, class: "me-3 !h-6 checked:after:!content-['\u2714'] !rounded-none !border-primary !w-6" }, null, 8, ["onUpdate:modelValue"]), [[vModelCheckbox, unref(H2).saveForLater]]), createVNode("label", { for: "saveForLater", class: "text-lg cursor-pointer" }, toDisplayString(e2.$t("LABELS.save_for_later")), 1)]), createVNode("button", { loading: unref(W), disabled: unref(W), type: "submit", class: "base-btn capitalize !h-14 w-full bg-black text-white" }, toDisplayString(e2.$t("LABELS.save_address")), 9, ["loading", "disabled"])]), _: 1 }, 8, ["validation-schema", "initialValues"])], 8, ["onClick"])];
        a3(`<div class="bg-white max-h-[95%] w-[800px] overflow-y-auto p-4 lg:p-12" data-aos="zoom-in" data-aos-duration="800"${s3}><div class="relative"${s3}><h4 class="text-xl lg:text-3xl text-center mb-10 font-bold"${s3}>${ssrInterpolate(e2.$t("TITLES.add_new_address"))}</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"${s3}>`), a3(ssrRenderComponent(Z2, { name: "close-2" }, null, l3, s3)), a3("</button></div>"), a3(ssrRenderComponent($e, { "validation-schema": unref(te), onSubmit: se, initialValues: unref(H2) }, { default: withCtx((t5, a4, l4, s4) => {
          if (!a4) return [createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Ee, { name: "country", label: e2.$t("LABELS.country"), placeholder: e2.$t("INPUTS.country"), value: unref(H2).country, "onUpdate:value": (e3) => unref(H2).country = e3, items: unref(I2).countries }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", null, [createVNode(Ee, { name: "state", label: e2.$t("LABELS.state"), placeholder: e2.$t("INPUTS.state"), value: unref(H2).state, "onUpdate:value": (e3) => unref(H2).state = e3, items: unref(ae) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])])]), createVNode("div", { class: "mb-6" }, [createVNode(Ee, { name: "city", label: e2.$t("LABELS.city"), placeholder: e2.$t("INPUTS.city"), value: unref(H2).city, "onUpdate:value": (e3) => unref(H2).city = e3, items: unref(le) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Se, { name: "name", label: e2.$t("LABELS.name"), placeholder: e2.$t("INPUTS.name"), type: "text", value: unref(H2).name, "onUpdate:value": (e3) => unref(H2).name = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", null, [createVNode(Se, { name: "last_name", label: e2.$t("LABELS.last_name"), placeholder: e2.$t("INPUTS.last_name"), type: "text", value: unref(H2).last_name, "onUpdate:value": (e3) => unref(H2).last_name = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])])]), createVNode("div", { class: "mb-6" }, [createVNode(Te, { name: "phone", label: e2.$t("LABELS.phone"), placeholder: e2.$t("INPUTS.phone"), value: unref(H2).phone, "onUpdate:value": (e3) => unref(H2).phone = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(we, { name: "address", label: e2.$t("LABELS.address"), placeholder: e2.$t("INPUTS.address"), value: unref(H2).address, "onUpdate:value": (e3) => unref(H2).address = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(Se, { name: "zip_code", label: e2.$t("LABELS.zip_code"), placeholder: e2.$t("INPUTS.zip_code"), type: "text", value: unref(H2).zip_code, "onUpdate:value": (e3) => unref(H2).zip_code = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6 flex items-center" }, [withDirectives(createVNode("input", { type: "checkbox", id: "saveForLater", "onUpdate:modelValue": (e3) => unref(H2).saveForLater = e3, class: "me-3 !h-6 checked:after:!content-['\u2714'] !rounded-none !border-primary !w-6" }, null, 8, ["onUpdate:modelValue"]), [[vModelCheckbox, unref(H2).saveForLater]]), createVNode("label", { for: "saveForLater", class: "text-lg cursor-pointer" }, toDisplayString(e2.$t("LABELS.save_for_later")), 1)]), createVNode("button", { loading: unref(W), disabled: unref(W), type: "submit", class: "base-btn capitalize !h-14 w-full bg-black text-white" }, toDisplayString(e2.$t("LABELS.save_address")), 9, ["loading", "disabled"])];
          a4(`<div class="grid grid-cols-2 gap-4 mb-6"${s4}><div${s4}>`), a4(ssrRenderComponent(Ee, { name: "country", label: e2.$t("LABELS.country"), placeholder: e2.$t("INPUTS.country"), value: unref(H2).country, "onUpdate:value": (e3) => unref(H2).country = e3, items: unref(I2).countries }, null, l4, s4)), a4(`</div><div${s4}>`), a4(ssrRenderComponent(Ee, { name: "state", label: e2.$t("LABELS.state"), placeholder: e2.$t("INPUTS.state"), value: unref(H2).state, "onUpdate:value": (e3) => unref(H2).state = e3, items: unref(ae) }, null, l4, s4)), a4(`</div></div><div class="mb-6"${s4}>`), a4(ssrRenderComponent(Ee, { name: "city", label: e2.$t("LABELS.city"), placeholder: e2.$t("INPUTS.city"), value: unref(H2).city, "onUpdate:value": (e3) => unref(H2).city = e3, items: unref(le) }, null, l4, s4)), a4(`</div><div class="grid grid-cols-2 gap-4 mb-6"${s4}><div${s4}>`), a4(ssrRenderComponent(Se, { name: "name", label: e2.$t("LABELS.name"), placeholder: e2.$t("INPUTS.name"), type: "text", value: unref(H2).name, "onUpdate:value": (e3) => unref(H2).name = e3 }, null, l4, s4)), a4(`</div><div${s4}>`), a4(ssrRenderComponent(Se, { name: "last_name", label: e2.$t("LABELS.last_name"), placeholder: e2.$t("INPUTS.last_name"), type: "text", value: unref(H2).last_name, "onUpdate:value": (e3) => unref(H2).last_name = e3 }, null, l4, s4)), a4(`</div></div><div class="mb-6"${s4}>`), a4(ssrRenderComponent(Te, { name: "phone", label: e2.$t("LABELS.phone"), placeholder: e2.$t("INPUTS.phone"), value: unref(H2).phone, "onUpdate:value": (e3) => unref(H2).phone = e3 }, null, l4, s4)), a4(`</div><div class="mb-6"${s4}>`), a4(ssrRenderComponent(we, { name: "address", label: e2.$t("LABELS.address"), placeholder: e2.$t("INPUTS.address"), value: unref(H2).address, "onUpdate:value": (e3) => unref(H2).address = e3 }, null, l4, s4)), a4(`</div><div class="mb-6"${s4}>`), a4(ssrRenderComponent(Se, { name: "zip_code", label: e2.$t("LABELS.zip_code"), placeholder: e2.$t("INPUTS.zip_code"), type: "text", value: unref(H2).zip_code, "onUpdate:value": (e3) => unref(H2).zip_code = e3 }, null, l4, s4)), a4(`</div><div class="mb-6 flex items-center"${s4}><input type="checkbox" id="saveForLater"${ssrIncludeBooleanAttr(Array.isArray(unref(H2).saveForLater) ? ssrLooseContain(unref(H2).saveForLater, null) : unref(H2).saveForLater) ? " checked" : ""} class="me-3 !h-6 checked:after:!content-[&#39;\u2714&#39;] !rounded-none !border-primary !w-6"${s4}><label for="saveForLater" class="text-lg cursor-pointer"${s4}>${ssrInterpolate(e2.$t("LABELS.save_for_later"))}</label></div><button${ssrRenderAttr("loading", unref(W))}${ssrIncludeBooleanAttr(unref(W)) ? " disabled" : ""} type="submit" class="base-btn capitalize !h-14 w-full bg-black text-white"${s4}>${ssrInterpolate(e2.$t("LABELS.save_address"))}</button>`);
        }), _: 1 }, l3, s3)), a3("</div>");
      }), _: 1 }, a2)) : t3("<!---->");
    }, "body", false, a2), unref(X) ? ssrRenderTeleport(t2, (t3) => {
      t3(ssrRenderComponent(Ae, { onClose: (e3) => X.value = false, title: e2.$t("TITLES.address_added"), desc: e2.$t("TITLES.address_added_desc") }, null, a2));
    }, "body", false, a2) : t2("<!---->"), t2("</div>");
  };
} }, H = K.setup;
K.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("pages/order/payment/index.vue"), H ? H(e2, t2) : undefined;
};

export { K as default };
//# sourceMappingURL=index-C5SzlXy-.mjs.map
