import { q } from './BaseTextInput-Uos38syD.mjs';
import { k } from './BasePhoneInput-3_AyFPIq.mjs';
import { x } from './BaseDateInput-DoqKlvmk.mjs';
import { I } from './BaseSelectInput-DtQVsXjS.mjs';
import { u as ef, a as Qt, b as Qs, c as gn, _ as An } from './server.mjs';
import { g } from './SvgIcon-C2791tkm.mjs';
import { A, U } from './EditPhoneForm-Cj3J6gLP.mjs';
import { useSSRContext, ref, resolveComponent, mergeProps, unref, withCtx, createVNode, toDisplayString, createTextVNode } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrRenderTeleport } from 'vue/server-renderer';
import { p as pe } from './index-Dj5w-pp2.mjs';
import * as R from 'yup';
import './client-only-CAHE6F0E.mjs';
import '@headlessui/vue';
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 './Modal-D5UZ0nAS.mjs';
import './Backdrop-pjkNt7ac.mjs';
import 'vue3-otp-input';

const w = { __name: "SignupForm", __ssrInlineRender: true, emits: ["close", "forgetPassword", "signUp", "goToVerify"], setup(u2, { emit: w2 }) {
  const P2 = ef(), B2 = ref(false), j2 = ref(false), A$1 = () => {
    gn("oldPhoneCode").value = gn("phoneCode").value, gn("oldPhone").value = gn("phone").value, B2.value = false, j2.value = true;
  }, N = () => {
    B2.value = !B2.value;
  }, U$1 = Qt().$axios, { t: O } = Qs(), F = ref(R.object().shape({ name: R.string().required(O("ERRORS.name")), email: R.string().email(O("ERRORS.invalidEmail")).required(O("ERRORS.email")), phone: R.object().shape({ phone_number: R.string().required(O("ERRORS.phone")).test("phone-length", function(e2) {
    const { phone_limit: t2 } = this.parent;
    return !!e2 && (e2.length === t2 || this.createError({ message: O("ERRORS.phone_limit", { phone_limit: t2 }) }));
  }), phone_code: R.string().required(O("ERRORS.phone_code")) }), birthday: R.string().required(O("ERRORS.birthday")), type: R.object().required(O("ERRORS.type")), country: R.object().required(O("ERRORS.country")), password: R.string().required(O("ERRORS.password")).min(6, O("ERRORS.passwordMinLength")) })), q$1 = ref([{ id: "male", name: "Male" }, { id: "female", name: "Female" }]), C = ref(false), k$1 = async (e2) => {
    C.value = true, U$1.post("register", { name: e2.name, email: e2.email, phone: e2.phone.phone_number, phone_code: e2.phone.phone_code, date_of_birth: e2.birthday, gender: e2.type.id, country_id: e2.country.id, password: e2.password }).then((t2) => {
      gn("phoneCode").value = e2.phone.phone_code, gn("phone").value = e2.phone.phone_number, pe.success(t2.data.message), N();
    }).catch((e3) => {
      pe.error(e3.response.data.message);
    }).finally(() => {
      C.value = false;
    });
  };
  return (o2, n2, i2, r2) => {
    const u3 = resolveComponent("VeeForm"), c2 = q, R2 = k, I2 = x, w3 = I, U2 = An, O2 = g, D = A, z = U;
    n2(`<div${ssrRenderAttrs(mergeProps({ class: "shadow-[0px_0px_24px_0px_#20202014] p-4 lg:p-8" }, r2))}><h1 class="text-primary capitalize !text-2xl text-center font-DMSerifDisplay italic mb-8 sm:text-4xl">${ssrInterpolate(o2.$t("TITLES.createAccountTitle"))}</h1>`), n2(ssrRenderComponent(u3, { "validation-schema": unref(F), onSubmit: k$1 }, { default: withCtx((e2, t2, a2, l2) => {
      if (!t2) return [createVNode("div", { class: "mb-8" }, [createVNode(c2, { name: "name", label: o2.$t("LABELS.name"), placeholder: o2.$t("INPUTS.name"), type: "text" }, null, 8, ["label", "placeholder"])]), createVNode("div", { class: "mb-8" }, [createVNode(c2, { name: "email", label: o2.$t("LABELS.email"), placeholder: o2.$t("INPUTS.email"), type: "email" }, null, 8, ["label", "placeholder"])]), createVNode("div", { class: "mb-8" }, [createVNode(R2, { name: "phone", label: o2.$t("LABELS.phone"), placeholder: o2.$t("INPUTS.phone") }, null, 8, ["label", "placeholder"])]), createVNode("div", { class: "mb-8" }, [createVNode(I2, { name: "birthday", label: o2.$t("LABELS.birthday"), placeholder: o2.$t("INPUTS.selectBirthday") }, null, 8, ["label", "placeholder"])]), createVNode("div", { class: "mb-8 grid grid-cols-2 gap-3 lg:gap-6" }, [createVNode("div", null, [createVNode(w3, { name: "type", label: o2.$t("LABELS.type"), placeholder: o2.$t("INPUTS.type"), items: unref(q$1) }, null, 8, ["label", "placeholder", "items"])]), createVNode("div", null, [createVNode(w3, { name: "country", label: o2.$t("LABELS.country"), placeholder: o2.$t("INPUTS.country"), items: unref(P2).countries }, null, 8, ["label", "placeholder", "items"])])]), createVNode("div", { class: "mb-8" }, [createVNode(c2, { name: "password", label: o2.$t("LABELS.password"), placeholder: o2.$t("INPUTS.password"), type: "password" }, null, 8, ["label", "placeholder"])]), createVNode("div", null, [createVNode("button", { loading: unref(C), disabled: unref(C), type: "submit", class: "base-btn capitalize w-full mb-2" }, toDisplayString(o2.$t("TITLES.registerNow")), 9, ["loading", "disabled"])])];
      t2(`<div class="mb-8"${l2}>`), t2(ssrRenderComponent(c2, { name: "name", label: o2.$t("LABELS.name"), placeholder: o2.$t("INPUTS.name"), type: "text" }, null, a2, l2)), t2(`</div><div class="mb-8"${l2}>`), t2(ssrRenderComponent(c2, { name: "email", label: o2.$t("LABELS.email"), placeholder: o2.$t("INPUTS.email"), type: "email" }, null, a2, l2)), t2(`</div><div class="mb-8"${l2}>`), t2(ssrRenderComponent(R2, { name: "phone", label: o2.$t("LABELS.phone"), placeholder: o2.$t("INPUTS.phone") }, null, a2, l2)), t2(`</div><div class="mb-8"${l2}>`), t2(ssrRenderComponent(I2, { name: "birthday", label: o2.$t("LABELS.birthday"), placeholder: o2.$t("INPUTS.selectBirthday") }, null, a2, l2)), t2(`</div><div class="mb-8 grid grid-cols-2 gap-3 lg:gap-6"${l2}><div${l2}>`), t2(ssrRenderComponent(w3, { name: "type", label: o2.$t("LABELS.type"), placeholder: o2.$t("INPUTS.type"), items: unref(q$1) }, null, a2, l2)), t2(`</div><div${l2}>`), t2(ssrRenderComponent(w3, { name: "country", label: o2.$t("LABELS.country"), placeholder: o2.$t("INPUTS.country"), items: unref(P2).countries }, null, a2, l2)), t2(`</div></div><div class="mb-8"${l2}>`), t2(ssrRenderComponent(c2, { name: "password", label: o2.$t("LABELS.password"), placeholder: o2.$t("INPUTS.password"), type: "password" }, null, a2, l2)), t2(`</div><div${l2}><button${ssrRenderAttr("loading", unref(C))}${ssrIncludeBooleanAttr(unref(C)) ? " disabled" : ""} type="submit" class="base-btn capitalize w-full mb-2"${l2}>${ssrInterpolate(o2.$t("TITLES.registerNow"))}</button></div>`);
    }), _: 1 }, i2)), n2(`<div class="flex items-center justify-center gap-2 my-6"><span>${ssrInterpolate(o2.$t("TITLES.have_account"))}</span>`), n2(ssrRenderComponent(U2, { to: o2.localePath("/auth/login"), class: "text-[#06528D]", type: "button" }, { default: withCtx((e2, t2, a2, l2) => {
      if (!t2) return [createTextVNode(toDisplayString(o2.$t("TITLES.login")), 1)];
      t2(`${ssrInterpolate(o2.$t("TITLES.login"))}`);
    }), _: 1 }, i2)), n2('</div><div class="flex flex-wrap gap-2 items-center"><button class="flex-1 py-3 px-2 flex items-center justify-center gap-1.5 border-#E1E1E1 border shadow-[0px_8px_30px_0px_#00000008]">'), n2(ssrRenderComponent(O2, { name: "blue-facebook" }, null, i2)), n2(`<span>${ssrInterpolate(o2.$t("TITLES.facebook"))}</span></button><button class="flex-1 py-3 px-2 flex items-center justify-center gap-1.5 border-#E1E1E1 border shadow-[0px_8px_30px_0px_#00000008]">`), n2(ssrRenderComponent(O2, { name: "Google" }, null, i2)), n2(`<span>${ssrInterpolate(o2.$t("TITLES.google"))}</span></button><button class="flex-1 py-3 px-2 flex items-center justify-center gap-1.5 border-#E1E1E1 border shadow-[0px_8px_30px_0px_#00000008]">`), n2(ssrRenderComponent(O2, { name: "ic_round-apple" }, null, i2)), n2(`<span>${ssrInterpolate(o2.$t("TITLES.apple"))}</span></button></div><div class="flex items-center justify-center gap-2 my-6">`), n2(ssrRenderComponent(U2, { to: o2.localePath("/"), class: "text-[#1F1F1F] font-medium underline text-lg", type: "button" }, { default: withCtx((e2, t2, a2, l2) => {
      if (!t2) return [createTextVNode(toDisplayString(o2.$t("TITLES.continueAsVisitor")), 1)];
      t2(`${ssrInterpolate(o2.$t("TITLES.continueAsVisitor"))}`);
    }), _: 1 }, i2)), n2("</div>"), unref(B2) ? ssrRenderTeleport(n2, (e2) => {
      e2(ssrRenderComponent(D, { onEditPhone: A$1, onClose: (e3) => B2.value = false, title: o2.$t("TITLES.confirmationCode") }, null, i2));
    }, "body", false, i2) : n2("<!---->"), unref(j2) ? ssrRenderTeleport(n2, (e2) => {
      e2(ssrRenderComponent(z, { onToggleOtp: N, onClose: (e3) => j2.value = false, title: o2.$t("TITLES.editPhoneNumber") }, null, i2));
    }, "body", false, i2) : n2("<!---->"), n2("</div>");
  };
} }, P = w.setup;
w.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Auth/SignupForm.vue"), P ? P(e2, t2) : undefined;
};
const B = { __name: "index", __ssrInlineRender: true, setup: (e2) => (e3, t2, a2, l2) => {
  const o2 = w;
  t2(`<div${ssrRenderAttrs(l2)}>`), t2(ssrRenderComponent(o2, null, null, a2)), t2("</div>");
} }, j = B.setup;
B.setup = (e2, t2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("pages/auth/create-account/index.vue"), j ? j(e2, t2) : undefined;
};

export { B as default };
//# sourceMappingURL=index-BW7Yj9KC.mjs.map
