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-DmMp038e.mjs';
import { b } from './breadcrumb-WIdlJL1E.mjs';
import { N, j } from './AddressCard-HW2ykoZk.mjs';
import { h, B, I } from './Cash-DeDYMBjo.mjs';
import { a } from './NoData-_gkxejn4.mjs';
import { ref, watch, resolveComponent, mergeProps, withCtx, createVNode, unref, isRef, withModifiers, toDisplayString, withDirectives, vModelCheckbox, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderAttr, ssrIncludeBooleanAttr, ssrRenderTeleport, ssrLooseContain, ssrRenderClass, ssrLooseEqual } from 'vue/server-renderer';
import { A } from './visa-YBBZ6mho.mjs';
import { t } from './client-only-CAHE6F0E.mjs';
import { o } from './Backdrop-Ez8lg5QV.mjs';
import { I as I$1 } from './BaseSelectInput-KcVRoGDw.mjs';
import { q } from './BaseTextInput-BPxtRr_w.mjs';
import { k } from './BasePhoneInput-HwAVLsJ_.mjs';
import { l } from './Success-CPwGoGGk.mjs';
import { p as pe } from './index-Dj5w-pp2.mjs';
import * as R 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 Y = { __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>`);
  };
} }, Q = Y.setup;
Y.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Shared/PaymentMethods.vue"), Q ? Q(e2, t2) : undefined;
};
const K = "data:image/png;base64, ", H = { __name: "index", __ssrInlineRender: true, setup(b2) {
  const I2 = ef(), { public: { baseGeneralURL: C2 } } = Zt(), Q2 = Ma(), H2 = ref(false), X2 = ref({ country: null, city: null, state: null, saveForLater: false }), W = ref(false), Z = ref(false), ee = Qt().$axios, { t: te } = Qs(), ae = R.object().shape({ country: R.object().required(te("ERRORS.country")), state: R.object().required(te("ERRORS.state")), city: R.object().required(te("ERRORS.city")), name: R.string().required(te("ERRORS.name")), last_name: R.string().required(te("ERRORS.last_name")), address: R.object().required(te("ERRORS.address")), zip_code: R.string().required(te("ERRORS.zip_code")), phone: R.object().shape({ phone_number: R.string().required(te("ERRORS.phone")).test("phone-length", function(e2) {
    const { phone_limit: t2 } = this.parent;
    return !!e2 && (e2.length === t2 || this.createError({ message: te("ERRORS.phone_limit", { phone_limit: t2 }) }));
  }), phone_code: R.string().required(te("ERRORS.phone_code")) }) }), le = ref([]), se = ref([]);
  watch(() => X2.value.country, (e2) => {
    e2 ? (async (e3) => {
      ee(`get_country_states/${e3}`, { method: "GET", baseURL: C2 }).then((e4) => {
        le.value = e4.data.data;
      }).catch((e4) => {
      });
    })(e2.id) : (le.value = [], se.value = []);
  }, { deep: true, immediate: true }), watch(() => X2.value.state, (e2) => {
    e2 ? (async (e3) => {
      ee(`get_state_cities/${e3}`, { method: "GET", baseURL: C2 }).then((e4) => {
        se.value = e4.data.data;
      }).catch((e4) => {
      });
    })(e2.id) : se.value = [];
  }, { deep: true, immediate: true });
  const de = async (e2) => {
    Z.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", +X2.value.saveForLater);
    try {
      await ee("address", { method: "POST", data: t2 }), W.value = true, H2.value = false, ce();
    } catch (a2) {
      pe.error(a2.response.data.message);
    } finally {
      Z.value = false;
    }
  }, oe = ref([{ name: te("NAV.home"), to: "/" }, { name: te("NAV.cart"), to: "/cart", disabled: false }, { name: te("TITLES.confirm_order"), to: "", disabled: true }, { name: te("TITLES.payment"), to: "/order/payment", disabled: true }]), re = ref(false), { data: ie, status: ne, refresh: ce } = wn("addresses", () => ee("address").then((e2) => e2.data.data).catch((e2) => e2.response.data)), pe$1 = ref(null);
  watch(() => ie.value, (e2) => {
    var t2;
    (null == e2 ? undefined : e2.length) && (pe$1.value = null == (t2 = null == e2 ? undefined : e2.find((e3) => e3.is_default)) ? undefined : t2.id);
  }, { deep: true, immediate: true });
  const { data: ue, status: ve, refresh: me } = wn("cart", () => (() => {
    var e2, t2, a2, l2;
    const s2 = new URLSearchParams();
    return (null == (e2 = Q2.query) ? undefined : e2.selected) && ("string" == typeof (null == (t2 = Q2.query) ? undefined : t2.selected) ? s2.append("product_cart_ids[0]", null == (a2 = Q2.query) ? undefined : a2.selected) : null == (l2 = Q2.query) || l2.selected.map((e3, t3) => {
      s2.append(`product_cart_ids[${t3}]`, e3);
    })), ee("cart", { params: s2 }).then((e3) => e3.data).catch((e3) => e3.response.data);
  })()), be = ref([]);
  watch(() => ue.value, (e2) => {
    var t2, a2;
    (null == (a2 = null == (t2 = null == e2 ? undefined : e2.data) ? undefined : t2.items) ? undefined : a2.length) && (Q2.query.selected ? be.value = e2.data.items.filter((e3) => Q2.query.selected.includes(e3.product_cart_id.toString())) : be.value = e2.data.items);
  }, { deep: true, immediate: true });
  const he = ref(null), xe = ref("online"), fe = ref(""), ge = ref(null);
  return (e2, t2, a2, l2) => {
    var _a;
    var s2, o2, b3, h2, x2, C3, O2, G2;
    const Q3 = An, ee2 = g, ne2 = b, ve2 = N, me2 = I, ye = a, Le = Y, we = t, Ee = o, $e = resolveComponent("VeeForm"), Se = I$1, Ae = q, Te = k, _e = j, Ue = 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(Q3, { 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(ee2, { name: "arrow-left", class: "[&_path]:fill-primary scale-[.60]" })];
      t3(ssrRenderComponent(ee2, { name: "arrow-left", class: "[&_path]:fill-primary scale-[.60]" }, null, a3, l3));
    }), _: 1 }, a2)), t2(ssrRenderComponent(ne2, { items: unref(oe) }, 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(te)("TITLES.address"))}</h3><!--[-->`), ssrRenderList(unref(ie), (e3) => {
      t2(ssrRenderComponent(ve2, { key: e3.id, address: e3, checkout: "", onUpdated: unref(ce), value: unref(pe$1), "onUpdate:value": (e4) => isRef(pe$1) ? pe$1.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(te)("TITLES.order_details"))}</h2>`), unref(be).length ? (t2('<div class="space-y-8"><!--[-->'), ssrRenderList(unref(be), (e3) => {
      t2(ssrRenderComponent(me2, { key: e3.id, product: e3, "show-action": false }, null, a2));
    }), t2("<!--]--></div>")) : (t2("<div>"), t2(ssrRenderComponent(ye, null, null, a2)), t2("</div>")), t2("</div>"), t2(ssrRenderComponent(Le, { value: unref(xe), "onUpdate:value": (e3) => isRef(xe) ? xe.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(he)) ? undefined : s2.sub_total) ? t2(`<div class="font-bold xl:text-xl whitespace-nowrap"><span class="line-through text-desc">${ssrInterpolate(unref(ue).sub_total)}</span> ${ssrInterpolate(null == (o2 = unref(he)) ? undefined : o2.sub_total)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`) : t2(`<div class="font-bold xl:text-xl whitespace-nowrap">${ssrInterpolate(unref(ue).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(he)) ? undefined : b3.vat_price) ? t2(`<div class="font-bold xl:text-xl whitespace-nowrap"><span class="line-through text-desc">${ssrInterpolate(unref(ue).vat_price)}</span> ${ssrInterpolate(null == (h2 = unref(he)) ? undefined : h2.vat_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`) : t2(`<div class="font-bold xl:text-xl whitespace-nowrap">${ssrInterpolate(unref(ue).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 whitespace-nowrap">${ssrInterpolate((_a = unref(ue).shipping_price) != 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(he)) ? undefined : x2.total_price) ? t2(`<div class="font-bold xl:text-xl whitespace-nowrap"><span class="line-through text-desc">${ssrInterpolate(unref(ue).total_price)}</span> ${ssrInterpolate(null == (C3 = unref(he)) ? undefined : C3.total_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`) : t2(`<div class="font-bold xl:text-xl whitespace-nowrap">${ssrInterpolate(unref(ue).total_price)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div>`), t2("</div></div>"), t2(ssrRenderComponent(we, null, {}, a2)), t2(`</div><div class="bg-[#F9F9F9] p-6"><h3 class="font-bold text-xl xl:text-2xl mb-6">${ssrInterpolate(unref(te)("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(ee2, { 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(fe))}>`), (null == (O2 = unref(he)) ? undefined : O2.total_price) ? (t2('<button class="size-6 flex items-center justify-center rounded-full" type="button">'), t2(ssrRenderComponent(ee2, { name: "xmark" }, null, a2)), t2("</button>")) : t2(`<button${ssrIncludeBooleanAttr(!unref(fe) && !(null == (G2 = unref(he)) ? undefined : G2.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(te)("TITLES.apply"))}</button>`), t2("</div></form></div></div>"), ssrRenderTeleport(t2, (t3) => {
      unref(re) ? t3(ssrRenderComponent(Ee, 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(te)("TITLES.thanks_for_shopping")), 1)]), createVNode("div", { class: "pb-6 border-b-2 border-opacity-30 border-[#909EAC]" }, [createVNode("img", { src: K, 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(te)("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(te)("TITLES.items_ordered")), 1), createVNode("div", { class: "font-bold xl:text-xl" }, toDisplayString(null == (n2 = unref(ge)) ? 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(te)("TITLES.total")), 1), createVNode("div", { class: "font-bold xl:text-xl" }, toDisplayString(null == (c2 = unref(ge)) ? undefined : c2.total) + " " + toDisplayString(e2.$t("TITLES.egp")), 1)]), createVNode("div", { class: "text-center xl:text-xl" }, toDisplayString(unref(te)("TITLES.order")) + " #" + toDisplayString(null == (p2 = unref(ge)) ? undefined : p2.order_no), 1)]), createVNode(Q3, { to: e2.localePath(`/order/tracking-order/${null == (u2 = unref(ge)) ? undefined : u2.id}`), class: "block w-full" }, { default: withCtx(() => [createVNode("button", { class: "base-btn w-full capitalize mb-6 !h-14" }, toDisplayString(unref(te)("TITLES.track_your_order")), 1)]), _: 1 }, 8, ["to"]), createVNode(Q3, { 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(te)("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(te)("TITLES.thanks_for_shopping"))}</h4></div><div class="pb-6 border-b-2 border-opacity-30 border-[#909EAC]"${s3}><img${ssrRenderAttr("src", K)} 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(te)("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(te)("TITLES.items_ordered"))}</h4><div class="font-bold xl:text-xl"${s3}>${ssrInterpolate(null == (d2 = unref(ge)) ? 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(te)("TITLES.total"))}</h4><div class="font-bold xl:text-xl"${s3}>${ssrInterpolate(null == (o3 = unref(ge)) ? undefined : o3.total)} ${ssrInterpolate(e2.$t("TITLES.egp"))}</div></div><div class="text-center xl:text-xl"${s3}>${ssrInterpolate(unref(te)("TITLES.order"))} #${ssrInterpolate(null == (r2 = unref(ge)) ? undefined : r2.order_no)}</div></div>`), a3(ssrRenderComponent(Q3, { to: e2.localePath(`/order/tracking-order/${null == (i2 = unref(ge)) ? 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(te)("TITLES.track_your_order")), 1)];
          t5(`<button class="base-btn w-full capitalize mb-6 !h-14"${l4}>${ssrInterpolate(unref(te)("TITLES.track_your_order"))}</button>`);
        }), _: 1 }, l3, s3)), a3(ssrRenderComponent(Q3, { 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(te)("TITLES.continue_shopping")), 1)];
          t5(`<button class="base-btn w-full !bg-white border !text-primary !border-primary capitalize !h-14"${l4}>${ssrInterpolate(unref(te)("TITLES.continue_shopping"))}</button>`);
        }), _: 1 }, l3, s3)), a3("</div>");
      }), _: 1 }, a2)) : t3("<!---->");
    }, "body", false, a2), ssrRenderTeleport(t2, (t3) => {
      unref(H2) ? t3(ssrRenderComponent(Ee, { class: "!z-[999999999]", onClose: (e3) => H2.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) => H2.value = false }, [createVNode(ee2, { name: "close-2" })], 8, ["onClick"])]), createVNode($e, { "validation-schema": unref(ae), onSubmit: de, initialValues: unref(X2) }, { default: withCtx(() => [createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Se, { name: "country", label: e2.$t("LABELS.country"), placeholder: e2.$t("INPUTS.country"), value: unref(X2).country, "onUpdate:value": (e3) => unref(X2).country = e3, items: unref(I2).countries }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", null, [createVNode(Se, { name: "state", label: e2.$t("LABELS.state"), placeholder: e2.$t("INPUTS.state"), value: unref(X2).state, "onUpdate:value": (e3) => unref(X2).state = e3, items: unref(le) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])])]), createVNode("div", { class: "mb-6" }, [createVNode(Se, { name: "city", label: e2.$t("LABELS.city"), placeholder: e2.$t("INPUTS.city"), value: unref(X2).city, "onUpdate:value": (e3) => unref(X2).city = e3, items: unref(se) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Ae, { name: "name", label: e2.$t("LABELS.name"), placeholder: e2.$t("INPUTS.name"), type: "text", value: unref(X2).name, "onUpdate:value": (e3) => unref(X2).name = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", null, [createVNode(Ae, { name: "last_name", label: e2.$t("LABELS.last_name"), placeholder: e2.$t("INPUTS.last_name"), type: "text", value: unref(X2).last_name, "onUpdate:value": (e3) => unref(X2).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(X2).phone, "onUpdate:value": (e3) => unref(X2).phone = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(_e, { name: "address", label: e2.$t("LABELS.address"), placeholder: e2.$t("INPUTS.address"), value: unref(X2).address, "onUpdate:value": (e3) => unref(X2).address = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(Ae, { name: "zip_code", label: e2.$t("LABELS.zip_code"), placeholder: e2.$t("INPUTS.zip_code"), type: "text", value: unref(X2).zip_code, "onUpdate:value": (e3) => unref(X2).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(X2).saveForLater = e3, class: "me-3 !h-6 checked:after:!content-['\u2714'] !rounded-none !border-primary !w-6" }, null, 8, ["onUpdate:modelValue"]), [[vModelCheckbox, unref(X2).saveForLater]]), createVNode("label", { for: "saveForLater", class: "text-lg cursor-pointer" }, toDisplayString(e2.$t("LABELS.save_for_later")), 1)]), createVNode("button", { loading: unref(Z), disabled: unref(Z), 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(ee2, { name: "close-2" }, null, l3, s3)), a3("</button></div>"), a3(ssrRenderComponent($e, { "validation-schema": unref(ae), onSubmit: de, initialValues: unref(X2) }, { default: withCtx((t5, a4, l4, s4) => {
          if (!a4) return [createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Se, { name: "country", label: e2.$t("LABELS.country"), placeholder: e2.$t("INPUTS.country"), value: unref(X2).country, "onUpdate:value": (e3) => unref(X2).country = e3, items: unref(I2).countries }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", null, [createVNode(Se, { name: "state", label: e2.$t("LABELS.state"), placeholder: e2.$t("INPUTS.state"), value: unref(X2).state, "onUpdate:value": (e3) => unref(X2).state = e3, items: unref(le) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])])]), createVNode("div", { class: "mb-6" }, [createVNode(Se, { name: "city", label: e2.$t("LABELS.city"), placeholder: e2.$t("INPUTS.city"), value: unref(X2).city, "onUpdate:value": (e3) => unref(X2).city = e3, items: unref(se) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(Ae, { name: "name", label: e2.$t("LABELS.name"), placeholder: e2.$t("INPUTS.name"), type: "text", value: unref(X2).name, "onUpdate:value": (e3) => unref(X2).name = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", null, [createVNode(Ae, { name: "last_name", label: e2.$t("LABELS.last_name"), placeholder: e2.$t("INPUTS.last_name"), type: "text", value: unref(X2).last_name, "onUpdate:value": (e3) => unref(X2).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(X2).phone, "onUpdate:value": (e3) => unref(X2).phone = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(_e, { name: "address", label: e2.$t("LABELS.address"), placeholder: e2.$t("INPUTS.address"), value: unref(X2).address, "onUpdate:value": (e3) => unref(X2).address = e3 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(Ae, { name: "zip_code", label: e2.$t("LABELS.zip_code"), placeholder: e2.$t("INPUTS.zip_code"), type: "text", value: unref(X2).zip_code, "onUpdate:value": (e3) => unref(X2).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(X2).saveForLater = e3, class: "me-3 !h-6 checked:after:!content-['\u2714'] !rounded-none !border-primary !w-6" }, null, 8, ["onUpdate:modelValue"]), [[vModelCheckbox, unref(X2).saveForLater]]), createVNode("label", { for: "saveForLater", class: "text-lg cursor-pointer" }, toDisplayString(e2.$t("LABELS.save_for_later")), 1)]), createVNode("button", { loading: unref(Z), disabled: unref(Z), 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(Se, { name: "country", label: e2.$t("LABELS.country"), placeholder: e2.$t("INPUTS.country"), value: unref(X2).country, "onUpdate:value": (e3) => unref(X2).country = e3, items: unref(I2).countries }, null, l4, s4)), a4(`</div><div${s4}>`), a4(ssrRenderComponent(Se, { name: "state", label: e2.$t("LABELS.state"), placeholder: e2.$t("INPUTS.state"), value: unref(X2).state, "onUpdate:value": (e3) => unref(X2).state = e3, items: unref(le) }, null, l4, s4)), a4(`</div></div><div class="mb-6"${s4}>`), a4(ssrRenderComponent(Se, { name: "city", label: e2.$t("LABELS.city"), placeholder: e2.$t("INPUTS.city"), value: unref(X2).city, "onUpdate:value": (e3) => unref(X2).city = e3, items: unref(se) }, null, l4, s4)), a4(`</div><div class="grid grid-cols-2 gap-4 mb-6"${s4}><div${s4}>`), a4(ssrRenderComponent(Ae, { name: "name", label: e2.$t("LABELS.name"), placeholder: e2.$t("INPUTS.name"), type: "text", value: unref(X2).name, "onUpdate:value": (e3) => unref(X2).name = e3 }, null, l4, s4)), a4(`</div><div${s4}>`), a4(ssrRenderComponent(Ae, { name: "last_name", label: e2.$t("LABELS.last_name"), placeholder: e2.$t("INPUTS.last_name"), type: "text", value: unref(X2).last_name, "onUpdate:value": (e3) => unref(X2).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(X2).phone, "onUpdate:value": (e3) => unref(X2).phone = e3 }, null, l4, s4)), a4(`</div><div class="mb-6"${s4}>`), a4(ssrRenderComponent(_e, { name: "address", label: e2.$t("LABELS.address"), placeholder: e2.$t("INPUTS.address"), value: unref(X2).address, "onUpdate:value": (e3) => unref(X2).address = e3 }, null, l4, s4)), a4(`</div><div class="mb-6"${s4}>`), a4(ssrRenderComponent(Ae, { name: "zip_code", label: e2.$t("LABELS.zip_code"), placeholder: e2.$t("INPUTS.zip_code"), type: "text", value: unref(X2).zip_code, "onUpdate:value": (e3) => unref(X2).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(X2).saveForLater) ? ssrLooseContain(unref(X2).saveForLater, null) : unref(X2).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(Z))}${ssrIncludeBooleanAttr(unref(Z)) ? " 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(W) ? ssrRenderTeleport(t2, (t3) => {
      t3(ssrRenderComponent(Ue, { onClose: (e3) => W.value = false, title: e2.$t("TITLES.address_added"), desc: e2.$t("TITLES.address_added_desc") }, null, a2));
    }, "body", false, a2) : t2("<!---->"), t2("</div>");
  };
} }, X = H.setup;
H.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("pages/order/payment/index.vue"), X ? X(e2, t2) : undefined;
};

export { H as default };
//# sourceMappingURL=index-Cvb_O6n7.mjs.map
