import { g } from './SvgIcon-DmMp038e.mjs';
import { o } from './Backdrop-Ez8lg5QV.mjs';
import { I } from './BaseSelectInput-KcVRoGDw.mjs';
import { q } from './BaseTextInput-BPxtRr_w.mjs';
import { k } from './BasePhoneInput-HwAVLsJ_.mjs';
import { useSSRContext, ref, watch, resolveComponent, mergeProps, withCtx, createVNode, openBlock, createBlock, toDisplayString, createCommentVNode, unref, withModifiers, withDirectives, vModelCheckbox } from 'vue';
import { ssrRenderComponent, ssrRenderAttr, ssrInterpolate, ssrRenderAttrs, ssrIncludeBooleanAttr, ssrLooseEqual, ssrRenderTeleport, ssrLooseContain } from 'vue/server-renderer';
import { j as Fv, e as Zt, a as Qt, b as Qs, u as ef } from './server.mjs';
import { l } from './Success-CPwGoGGk.mjs';
import * as R from 'yup';
import { p as pe } from './index-Dj5w-pp2.mjs';

const j = { __name: "BaseMapInput", __ssrInlineRender: true, props: { name: { type: String, required: true }, label: { type: String, required: false }, placeholder: { type: String, required: false }, value: { type: Object, required: false }, disabled: { type: Boolean, required: false } }, emits: ["update:value"], setup(e2, { emit: a2 }) {
  const t2 = e2;
  const l2 = ref({}), s2 = Fv(t2.name);
  function d2(e3) {
    let a3 = (undefined).querySelector(`#${t2.name} .autocomplete-map`);
    l2.value = { lat: e3.geometry.location.lat(), lng: e3.geometry.location.lng() };
    let d3 = { location: a3.value, ...l2.value };
    s2.setValue(d3);
  }
  const $2 = /* @__PURE__ */ function(e3, a3) {
    let t3;
    return function(...l3) {
      clearTimeout(t3), t3 = setTimeout(() => e3.apply(this, l3), a3);
    };
  }(async function(e3) {
    let a3 = await async function(e4, a4) {
      const t4 = `https://maps.googleapis.com/maps/api/geocode/json?latlng=${e4},${a4}&key=AIzaSyDRymdCLWxCwLHFnwv36iieKAMjiwk8sdc`;
      return await fetch(t4).then((e5) => e5.json()).then((e5) => {
        var a5;
        if ("OK" === e5.status && e5.results.length > 0) return null == (a5 = e5.results[0]) ? undefined : a5.formatted_address;
        throw new Error("Unable to find the address");
      }).catch((e5) => {
      });
    }(e3.latLng.lat(), e3.latLng.lng());
    (undefined).querySelector(".autocomplete-map").value = a3, l2.value = { lat: e3.latLng.lat(), lng: e3.latLng.lng() };
    let t3 = { location: a3, ...l2.value };
    s2.setValue(t3);
  }, 200);
  return watch(() => t2.value, (e3) => {
    e3 ? (s2.setValue(e3), setTimeout(() => {
      (undefined).querySelector(".autocomplete-map").value = e3.location;
    }, 500), l2.value = { lat: e3.lat, lng: e3.lng }) : (undefined).geolocation && (undefined).geolocation.getCurrentPosition(function(e4) {
      const a3 = e4.coords.latitude, t3 = e4.coords.longitude;
      l2.value = { lat: a3, lng: t3 };
    }, function(e4) {
    });
  }, { deep: true, immediate: true }), (a3, t3, s3, n2) => {
    const o2 = resolveComponent("veeField"), y2 = resolveComponent("GMapAutocomplete"), g2 = resolveComponent("VeeErrorMessage"), L2 = resolveComponent("GMapMap"), S2 = resolveComponent("GMapMarker");
    t3(ssrRenderComponent(o2, mergeProps({ name: e2.name }, n2), { default: withCtx(({ field: a4, meta: t4 }, s4, n3, o3) => {
      if (!s4) return [createVNode("div", { class: "input-wrapper", id: e2.name }, [e2.label ? (openBlock(), createBlock("label", { key: 0, for: e2.name }, toDisplayString(e2.label), 9, ["for"])) : createCommentVNode("", true), createVNode(y2, { placeholder: e2.placeholder, onPlace_changed: d2, disabled: e2.disabled, class: "autocomplete-map" }, null, 8, ["placeholder", "disabled"]), createVNode(g2, { class: "text-sm text-red-500", name: e2.name }, null, 8, ["name"]), createVNode(L2, { center: l2.value, zoom: 13, "map-type-id": "terrain", style: { width: "100%", height: "250px", "border-radius": "10px", "margin-top": "8px" } }, { default: withCtx(() => [createVNode(S2, { clickable: true, draggable: true, position: l2.value, onDragend: unref($2) }, null, 8, ["position", "onDragend"])]), _: 1 }, 8, ["center"])], 8, ["id"])];
      s4(`<div class="input-wrapper"${ssrRenderAttr("id", e2.name)}${o3}>`), e2.label ? s4(`<label${ssrRenderAttr("for", e2.name)}${o3}>${ssrInterpolate(e2.label)}</label>`) : s4("<!---->"), s4(ssrRenderComponent(y2, { placeholder: e2.placeholder, onPlace_changed: d2, disabled: e2.disabled, class: "autocomplete-map" }, null, n3, o3)), s4(ssrRenderComponent(g2, { class: "text-sm text-red-500", name: e2.name }, null, n3, o3)), s4(ssrRenderComponent(L2, { center: l2.value, zoom: 13, "map-type-id": "terrain", style: { width: "100%", height: "250px", "border-radius": "10px", "margin-top": "8px" } }, { default: withCtx((e3, a5, t5, s5) => {
        if (!a5) return [createVNode(S2, { clickable: true, draggable: true, position: l2.value, onDragend: unref($2) }, null, 8, ["position", "onDragend"])];
        a5(ssrRenderComponent(S2, { clickable: true, draggable: true, position: l2.value, onDragend: unref($2) }, null, t5, s5));
      }), _: 2 }, n3, o3)), s4("</div>");
    }), _: 1 }, s3));
  };
} }, C = j.setup;
j.setup = (e2, a2) => {
  const t2 = useSSRContext();
  return (t2.modules || (t2.modules = /* @__PURE__ */ new Set())).add("components/Inputs/BaseMapInput.vue"), C ? C(e2, a2) : undefined;
};
const N = { __name: "AddressCard", __ssrInlineRender: true, props: { address: { type: Object, required: true }, checkout: { type: Boolean, default: false }, value: { type: Number, default: null } }, emits: ["updated", "update:value"], setup(d2, { emit: m2 }) {
  const { public: { baseGeneralURL: v2 } } = Zt(), h2 = Qt().$axios, { t: B2 } = Qs(), C2 = ef(), N2 = d2, F2 = ref(N2.value);
  watch(() => F2.value, () => {
    J("update:value", F2.value);
  }), watch(() => N2.value, (e2) => {
    e2 && (F2.value = N2.value);
  });
  const q$1 = ref(false), O = ref(false), D = ref({}), V = R.object().shape({ country: R.object().required(B2("ERRORS.country")), state: R.object().required(B2("ERRORS.state")), city: R.object().required(B2("ERRORS.city")), name: R.string().required(B2("ERRORS.name")), last_name: R.string().required(B2("ERRORS.last_name")), address: R.object().required(B2("ERRORS.address")), zip_code: R.string().required(B2("ERRORS.zip_code")), phone: R.object().shape({ phone_number: R.string().required(B2("ERRORS.phone")).test("phone-length", function(e2) {
    const { phone_limit: a2 } = this.parent;
    return !!e2 && (e2.length === a2 || this.createError({ message: B2("ERRORS.phone_limit", { phone_limit: a2 }) }));
  }), phone_code: R.string().required(B2("ERRORS.phone_code")) }) }), M = ref([]), G = ref([]);
  watch(() => D.value.country, (e2) => {
    e2 ? (async (e3) => {
      h2(`get_country_states/${e3}`, { method: "GET", baseURL: v2 }).then((e4) => {
        M.value = e4.data.data;
      }).catch((e4) => {
      });
    })(e2.id) : (M.value = [], G.value = []);
  }, { deep: true, immediate: true }), watch(() => D.value.state, (e2) => {
    e2 ? (async (e3) => {
      h2(`get_state_cities/${e3}`, { method: "GET", baseURL: v2 }).then((e4) => {
        G.value = e4.data.data;
      }).catch((e4) => {
      });
    })(e2.id) : G.value = [];
  }, { deep: true, immediate: true });
  const H = ref(false), K = ref(false), W = async (e2) => {
    K.value = true;
    const a2 = new FormData();
    a2.append("country_id", e2.country.id), a2.append("state_id", e2.state.id), a2.append("city_id", e2.city.id), a2.append("first_name", e2.name), a2.append("last_name", e2.last_name), a2.append("phone", e2.phone.phone_number), a2.append("phone_code", e2.phone.phone_code), a2.append("street_address", e2.address.location), a2.append("lat", e2.address.lat), a2.append("lng", e2.address.lng), a2.append("zip_code", e2.zip_code), a2.append("is_default", +D.value.saveForLater), a2.append("_method", "PUT");
    try {
      await h2(`address/${N2.address.id}`, { method: "POST", data: a2 }), q$1.value = false, H.value = true, J("updated");
    } catch (t2) {
      pe.error(t2.response.data.message);
    } finally {
      K.value = false;
    }
  }, J = m2;
  return (n2, o2, m3, v3) => {
    const B3 = g, I2 = o, w2 = resolveComponent("VeeForm"), A2 = I, k2 = q, R2 = k, Q = j, X = l;
    o2(`<label${ssrRenderAttrs(mergeProps({ for: `address${d2.address.id}`, class: ["border bg-white p-5 flex items-center gap-5", [d2.checkout ? "cursor-pointer" : "", d2.value == d2.address.id ? "border-primary" : "border-[#E4E7ED]"]] }, v3))}>`), d2.checkout ? o2(`<input type="radio" name="addresses" class="size-5 accent-primary"${ssrIncludeBooleanAttr(ssrLooseEqual(unref(F2), d2.address.id)) ? " checked" : ""}${ssrRenderAttr("id", `address${d2.address.id}`)}${ssrRenderAttr("value", d2.address.id)}>`) : o2("<!---->"), o2(`<div class="space-y-5 flex-1"><div class="flex items-center justify-between gap-4"><span class="text-xl font-semibold">${ssrInterpolate(d2.address.street_address)}, ${ssrInterpolate(d2.address.zip_code)}</span><a${ssrRenderAttr("href", `tel:${d2.address.phone_code}${d2.address.phone}`)} class="text-lg w-fit block text-[#606060]" dir="ltr"> +${ssrInterpolate(d2.address.phone_code)}${ssrInterpolate(d2.address.phone)}</a></div><p class="text-[#606060]">${ssrInterpolate(d2.address.first_name)} ${ssrInterpolate(d2.address.last_name)}</p><div class="flex items-center justify-between gap-4"><button class="flex items-center gap-2"><span class="text-[#DC6E07] font-medium text-lg">${ssrInterpolate(n2.$t("TITLES.edit"))}</span>`), o2(ssrRenderComponent(B3, { name: "edit", class: "[&_path]:fill-[#DC6E07]" }, null, m3)), o2("</button>"), d2.checkout ? o2("<!---->") : (o2(`<button class="flex items-center gap-2"><span class="text-[#EA4335] font-medium text-lg">${ssrInterpolate(n2.$t("BUTTONS.delete"))}</span>`), o2(ssrRenderComponent(B3, { name: "trash", class: "[&_path]:fill-[#EA4335] scale-75" }, null, m3)), o2("</button>")), o2("</div></div>"), ssrRenderTeleport(o2, (e2) => {
      unref(q$1) ? e2(ssrRenderComponent(I2, { onClose: (e3) => q$1.value = false }, { default: withCtx((e3, a2, t2, l2) => {
        if (!a2) 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(n2.$t("TITLES.edit_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: (e4) => q$1.value = false }, [createVNode(B3, { name: "close-2" })], 8, ["onClick"])]), createVNode(w2, { "validation-schema": unref(V), onSubmit: W, initialValues: unref(D) }, { default: withCtx(() => [createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(A2, { name: "country", label: n2.$t("LABELS.country"), placeholder: n2.$t("INPUTS.country"), value: unref(D).country, "onUpdate:value": (e4) => unref(D).country = e4, items: unref(C2).countries }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", null, [createVNode(A2, { name: "state", label: n2.$t("LABELS.state"), placeholder: n2.$t("INPUTS.state"), value: unref(D).state, "onUpdate:value": (e4) => unref(D).state = e4, items: unref(M) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])])]), createVNode("div", { class: "mb-6" }, [createVNode(A2, { name: "city", label: n2.$t("LABELS.city"), placeholder: n2.$t("INPUTS.city"), value: unref(D).city, "onUpdate:value": (e4) => unref(D).city = e4, items: unref(G) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(k2, { name: "name", label: n2.$t("LABELS.name"), placeholder: n2.$t("INPUTS.name"), type: "text", value: unref(D).name, "onUpdate:value": (e4) => unref(D).name = e4 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", null, [createVNode(k2, { name: "last_name", label: n2.$t("LABELS.last_name"), placeholder: n2.$t("INPUTS.last_name"), type: "text", value: unref(D).last_name, "onUpdate:value": (e4) => unref(D).last_name = e4 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])])]), createVNode("div", { class: "mb-6" }, [createVNode(R2, { name: "phone", label: n2.$t("LABELS.phone"), placeholder: n2.$t("INPUTS.phone"), value: unref(D).phone, "onUpdate:value": (e4) => unref(D).phone = e4 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(Q, { name: "address", label: n2.$t("LABELS.address"), placeholder: n2.$t("INPUTS.address"), value: unref(D).address, "onUpdate:value": (e4) => unref(D).address = e4 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(k2, { name: "zip_code", label: n2.$t("LABELS.zip_code"), placeholder: n2.$t("INPUTS.zip_code"), type: "text", value: unref(D).zip_code, "onUpdate:value": (e4) => unref(D).zip_code = e4 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6 flex items-center" }, [withDirectives(createVNode("input", { type: "checkbox", id: "saveForLater", "onUpdate:modelValue": (e4) => unref(D).saveForLater = e4, class: "me-3 !h-6 checked:after:!content-['\u2714'] !rounded-none !border-primary !w-6" }, null, 8, ["onUpdate:modelValue"]), [[vModelCheckbox, unref(D).saveForLater]]), createVNode("label", { for: "saveForLater", class: "text-lg cursor-pointer" }, toDisplayString(n2.$t("LABELS.save_for_later")), 1)]), createVNode("button", { loading: unref(K), disabled: unref(K), type: "submit", class: "base-btn capitalize !h-14 w-full bg-black text-white" }, toDisplayString(n2.$t("LABELS.save_address")), 9, ["loading", "disabled"])]), _: 1 }, 8, ["validation-schema", "initialValues"])], 8, ["onClick"])];
        a2(`<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"${l2}><div class="relative"${l2}><h4 class="text-xl lg:text-3xl text-center mb-10 font-bold"${l2}>${ssrInterpolate(n2.$t("TITLES.edit_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"${l2}>`), a2(ssrRenderComponent(B3, { name: "close-2" }, null, t2, l2)), a2("</button></div>"), a2(ssrRenderComponent(w2, { "validation-schema": unref(V), onSubmit: W, initialValues: unref(D) }, { default: withCtx((e4, a3, t3, l3) => {
          if (!a3) return [createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(A2, { name: "country", label: n2.$t("LABELS.country"), placeholder: n2.$t("INPUTS.country"), value: unref(D).country, "onUpdate:value": (e5) => unref(D).country = e5, items: unref(C2).countries }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", null, [createVNode(A2, { name: "state", label: n2.$t("LABELS.state"), placeholder: n2.$t("INPUTS.state"), value: unref(D).state, "onUpdate:value": (e5) => unref(D).state = e5, items: unref(M) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])])]), createVNode("div", { class: "mb-6" }, [createVNode(A2, { name: "city", label: n2.$t("LABELS.city"), placeholder: n2.$t("INPUTS.city"), value: unref(D).city, "onUpdate:value": (e5) => unref(D).city = e5, items: unref(G) }, null, 8, ["label", "placeholder", "value", "onUpdate:value", "items"])]), createVNode("div", { class: "grid grid-cols-2 gap-4 mb-6" }, [createVNode("div", null, [createVNode(k2, { name: "name", label: n2.$t("LABELS.name"), placeholder: n2.$t("INPUTS.name"), type: "text", value: unref(D).name, "onUpdate:value": (e5) => unref(D).name = e5 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", null, [createVNode(k2, { name: "last_name", label: n2.$t("LABELS.last_name"), placeholder: n2.$t("INPUTS.last_name"), type: "text", value: unref(D).last_name, "onUpdate:value": (e5) => unref(D).last_name = e5 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])])]), createVNode("div", { class: "mb-6" }, [createVNode(R2, { name: "phone", label: n2.$t("LABELS.phone"), placeholder: n2.$t("INPUTS.phone"), value: unref(D).phone, "onUpdate:value": (e5) => unref(D).phone = e5 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(Q, { name: "address", label: n2.$t("LABELS.address"), placeholder: n2.$t("INPUTS.address"), value: unref(D).address, "onUpdate:value": (e5) => unref(D).address = e5 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6" }, [createVNode(k2, { name: "zip_code", label: n2.$t("LABELS.zip_code"), placeholder: n2.$t("INPUTS.zip_code"), type: "text", value: unref(D).zip_code, "onUpdate:value": (e5) => unref(D).zip_code = e5 }, null, 8, ["label", "placeholder", "value", "onUpdate:value"])]), createVNode("div", { class: "mb-6 flex items-center" }, [withDirectives(createVNode("input", { type: "checkbox", id: "saveForLater", "onUpdate:modelValue": (e5) => unref(D).saveForLater = e5, class: "me-3 !h-6 checked:after:!content-['\u2714'] !rounded-none !border-primary !w-6" }, null, 8, ["onUpdate:modelValue"]), [[vModelCheckbox, unref(D).saveForLater]]), createVNode("label", { for: "saveForLater", class: "text-lg cursor-pointer" }, toDisplayString(n2.$t("LABELS.save_for_later")), 1)]), createVNode("button", { loading: unref(K), disabled: unref(K), type: "submit", class: "base-btn capitalize !h-14 w-full bg-black text-white" }, toDisplayString(n2.$t("LABELS.save_address")), 9, ["loading", "disabled"])];
          a3(`<div class="grid grid-cols-2 gap-4 mb-6"${l3}><div${l3}>`), a3(ssrRenderComponent(A2, { name: "country", label: n2.$t("LABELS.country"), placeholder: n2.$t("INPUTS.country"), value: unref(D).country, "onUpdate:value": (e5) => unref(D).country = e5, items: unref(C2).countries }, null, t3, l3)), a3(`</div><div${l3}>`), a3(ssrRenderComponent(A2, { name: "state", label: n2.$t("LABELS.state"), placeholder: n2.$t("INPUTS.state"), value: unref(D).state, "onUpdate:value": (e5) => unref(D).state = e5, items: unref(M) }, null, t3, l3)), a3(`</div></div><div class="mb-6"${l3}>`), a3(ssrRenderComponent(A2, { name: "city", label: n2.$t("LABELS.city"), placeholder: n2.$t("INPUTS.city"), value: unref(D).city, "onUpdate:value": (e5) => unref(D).city = e5, items: unref(G) }, null, t3, l3)), a3(`</div><div class="grid grid-cols-2 gap-4 mb-6"${l3}><div${l3}>`), a3(ssrRenderComponent(k2, { name: "name", label: n2.$t("LABELS.name"), placeholder: n2.$t("INPUTS.name"), type: "text", value: unref(D).name, "onUpdate:value": (e5) => unref(D).name = e5 }, null, t3, l3)), a3(`</div><div${l3}>`), a3(ssrRenderComponent(k2, { name: "last_name", label: n2.$t("LABELS.last_name"), placeholder: n2.$t("INPUTS.last_name"), type: "text", value: unref(D).last_name, "onUpdate:value": (e5) => unref(D).last_name = e5 }, null, t3, l3)), a3(`</div></div><div class="mb-6"${l3}>`), a3(ssrRenderComponent(R2, { name: "phone", label: n2.$t("LABELS.phone"), placeholder: n2.$t("INPUTS.phone"), value: unref(D).phone, "onUpdate:value": (e5) => unref(D).phone = e5 }, null, t3, l3)), a3(`</div><div class="mb-6"${l3}>`), a3(ssrRenderComponent(Q, { name: "address", label: n2.$t("LABELS.address"), placeholder: n2.$t("INPUTS.address"), value: unref(D).address, "onUpdate:value": (e5) => unref(D).address = e5 }, null, t3, l3)), a3(`</div><div class="mb-6"${l3}>`), a3(ssrRenderComponent(k2, { name: "zip_code", label: n2.$t("LABELS.zip_code"), placeholder: n2.$t("INPUTS.zip_code"), type: "text", value: unref(D).zip_code, "onUpdate:value": (e5) => unref(D).zip_code = e5 }, null, t3, l3)), a3(`</div><div class="mb-6 flex items-center"${l3}><input type="checkbox" id="saveForLater"${ssrIncludeBooleanAttr(Array.isArray(unref(D).saveForLater) ? ssrLooseContain(unref(D).saveForLater, null) : unref(D).saveForLater) ? " checked" : ""} class="me-3 !h-6 checked:after:!content-[&#39;\u2714&#39;] !rounded-none !border-primary !w-6"${l3}><label for="saveForLater" class="text-lg cursor-pointer"${l3}>${ssrInterpolate(n2.$t("LABELS.save_for_later"))}</label></div><button${ssrRenderAttr("loading", unref(K))}${ssrIncludeBooleanAttr(unref(K)) ? " disabled" : ""} type="submit" class="base-btn capitalize !h-14 w-full bg-black text-white"${l3}>${ssrInterpolate(n2.$t("LABELS.save_address"))}</button>`);
        }), _: 1 }, t2, l2)), a2("</div>");
      }), _: 1 }, m3)) : e2("<!---->");
    }, "body", false, m3), ssrRenderTeleport(o2, (e2) => {
      unref(O) ? e2(ssrRenderComponent(I2, { onClose: (e3) => O.value = false }, { default: withCtx((e3, a2, t2, l2) => {
        if (!a2) return [createVNode("div", { onClick: withModifiers(() => {
        }, ["stop"]), class: "bg-white w-[540px] max-h-[95%] overflow-y-auto max-w-[90%] py-6 lg:py-10 px-4 lg:px-8", "data-aos": "zoom-in", "data-aos-duration": "800" }, [createVNode("div", { class: "relative" }, [createVNode("h4", { class: "text-xl lg:text-2xl capitalize text-center mb-10 font-bold" }, toDisplayString(n2.$t("TITLES.delete_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: (e4) => O.value = false }, [createVNode(B3, { name: "close-2" })], 8, ["onClick"])]), createVNode("p", { class: "font-medium text-xl text-primary mb-10" }, toDisplayString(n2.$t("TITLES.delete_address_sure")), 1), createVNode("div", { class: "flex items-center justify-center gap-6" }, [createVNode("button", { onClick: (e4) => O.value = false, class: "base-btn !h-14 flex-1 !font-medium" }, toDisplayString(n2.$t("TITLES.keep_address")), 9, ["onClick"]), createVNode("button", { onClick: (e4) => {
          h2(`/address/${N2.address.id}`, { method: "DELETE" }).then((e5) => {
            O.value = false, pe.success(e5.data.message), J("updated");
          }).catch((e5) => {
            pe.error(e5.response.data.message);
          });
        }, class: "base-btn !h-14 flex-1 border border-[#FC1B1B] !font-medium !bg-white !text-[#FC1B1B]" }, toDisplayString(n2.$t("TITLES.delete_address")), 9, ["onClick"])])], 8, ["onClick"])];
        a2(`<div class="bg-white w-[540px] max-h-[95%] overflow-y-auto max-w-[90%] py-6 lg:py-10 px-4 lg:px-8" data-aos="zoom-in" data-aos-duration="800"${l2}><div class="relative"${l2}><h4 class="text-xl lg:text-2xl capitalize text-center mb-10 font-bold"${l2}>${ssrInterpolate(n2.$t("TITLES.delete_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"${l2}>`), a2(ssrRenderComponent(B3, { name: "close-2" }, null, t2, l2)), a2(`</button></div><p class="font-medium text-xl text-primary mb-10"${l2}>${ssrInterpolate(n2.$t("TITLES.delete_address_sure"))}</p><div class="flex items-center justify-center gap-6"${l2}><button class="base-btn !h-14 flex-1 !font-medium"${l2}>${ssrInterpolate(n2.$t("TITLES.keep_address"))}</button><button class="base-btn !h-14 flex-1 border border-[#FC1B1B] !font-medium !bg-white !text-[#FC1B1B]"${l2}>${ssrInterpolate(n2.$t("TITLES.delete_address"))}</button></div></div>`);
      }), _: 1 }, m3)) : e2("<!---->");
    }, "body", false, m3), unref(H) ? ssrRenderTeleport(o2, (e2) => {
      e2(ssrRenderComponent(X, { onClose: (e3) => H.value = false, title: n2.$t("TITLES.address_added"), desc: n2.$t("TITLES.address_added_desc") }, null, m3));
    }, "body", false, m3) : o2("<!---->"), o2("</label>");
  };
} }, F = N.setup;
N.setup = (e2, a2) => {
  const t2 = useSSRContext();
  return (t2.modules || (t2.modules = /* @__PURE__ */ new Set())).add("components/Shared/AddressCard.vue"), F ? F(e2, a2) : undefined;
};

export { N, j };
//# sourceMappingURL=AddressCard-HW2ykoZk.mjs.map
