import { _ as __nuxt_component_0 } from './nuxt-link-GYtpnRvD.mjs';
import { ref, reactive, watch, mergeProps, unref, withCtx, createTextVNode, isVNode, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderAttr, ssrRenderList, ssrRenderClass, ssrInterpolate, ssrRenderStyle, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderComponent } from 'vue/server-renderer';
import { _ as _imports_0 } from './virtual_public-B_E1G3G9.mjs';
import { _ as _imports_1 } from './virtual_public-LAo3x5RE.mjs';
import { u as useRuntimeConfig } from './server.mjs';
import '../_/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import 'vue-router';

var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
let toastsCounter = 1;
var Observer = class {
  constructor() {
    __publicField(this, "subscribers");
    __publicField(this, "toasts");
    __publicField(this, "dismissedToasts");
    __publicField(this, "subscribe", (subscriber) => {
      this.subscribers.push(subscriber);
      return () => {
        const index = this.subscribers.indexOf(subscriber);
        this.subscribers.splice(index, 1);
      };
    });
    __publicField(this, "publish", (data) => {
      this.subscribers.forEach((subscriber) => subscriber(data));
    });
    __publicField(this, "addToast", (data) => {
      this.publish(data);
      this.toasts = [...this.toasts, data];
    });
    __publicField(this, "create", (data) => {
      var _a;
      const { message, ...rest } = data;
      const id = typeof data.id === "number" || data.id && ((_a = data.id) == null ? void 0 : _a.length) > 0 ? data.id : toastsCounter++;
      const alreadyExists = this.toasts.find((toast$1) => {
        return toast$1.id === id;
      });
      const dismissible = data.dismissible === void 0 ? true : data.dismissible;
      if (this.dismissedToasts.has(id)) this.dismissedToasts.delete(id);
      if (alreadyExists) this.toasts = this.toasts.map((toast$1) => {
        if (toast$1.id === id) {
          this.publish({
            ...toast$1,
            ...data,
            id,
            title: message
          });
          return {
            ...toast$1,
            ...data,
            id,
            dismissible,
            title: message
          };
        }
        return toast$1;
      });
      else this.addToast({
        title: message,
        ...rest,
        dismissible,
        id
      });
      return id;
    });
    __publicField(this, "dismiss", (id) => {
      if (id) {
        this.dismissedToasts.add(id);
        requestAnimationFrame(() => this.subscribers.forEach((subscriber) => subscriber({
          id,
          dismiss: true
        })));
      } else this.toasts.forEach((toast$1) => {
        this.subscribers.forEach((subscriber) => subscriber({
          id: toast$1.id,
          dismiss: true
        }));
      });
      return id;
    });
    __publicField(this, "message", (message, data) => {
      return this.create({
        ...data,
        message,
        type: "default"
      });
    });
    __publicField(this, "error", (message, data) => {
      return this.create({
        ...data,
        type: "error",
        message
      });
    });
    __publicField(this, "success", (message, data) => {
      return this.create({
        ...data,
        type: "success",
        message
      });
    });
    __publicField(this, "info", (message, data) => {
      return this.create({
        ...data,
        type: "info",
        message
      });
    });
    __publicField(this, "warning", (message, data) => {
      return this.create({
        ...data,
        type: "warning",
        message
      });
    });
    __publicField(this, "loading", (message, data) => {
      return this.create({
        ...data,
        type: "loading",
        message
      });
    });
    __publicField(this, "promise", (promise, data) => {
      if (!data) return;
      let id;
      if (data.loading !== void 0) id = this.create({
        ...data,
        promise,
        type: "loading",
        message: data.loading,
        description: typeof data.description !== "function" ? data.description : void 0
      });
      const p = Promise.resolve(promise instanceof Function ? promise() : promise);
      let shouldDismiss = id !== void 0;
      let result;
      const originalPromise = p.then(async (response) => {
        result = ["resolve", response];
        const isVueComponent = isVNode(response);
        if (isVueComponent) {
          shouldDismiss = false;
          this.create({
            id,
            type: "default",
            message: response
          });
        } else if (isHttpResponse(response) && !response.ok) {
          shouldDismiss = false;
          const promiseData = typeof data.error === "function" ? await data.error(`HTTP error! status: ${response.status}`) : data.error;
          const description = typeof data.description === "function" ? await data.description(`HTTP error! status: ${response.status}`) : data.description;
          const isExtendedResult = typeof promiseData === "object" && !isVNode(promiseData);
          const toastSettings = isExtendedResult ? promiseData : {
            message: promiseData || "",
            id: id || ""
          };
          this.create({
            id,
            type: "error",
            description,
            ...toastSettings
          });
        } else if (response instanceof Error) {
          shouldDismiss = false;
          const promiseData = typeof data.error === "function" ? await data.error(response) : data.error;
          const description = typeof data.description === "function" ? await data.description(response) : data.description;
          const isExtendedResult = typeof promiseData === "object" && !isVNode(promiseData);
          const toastSettings = isExtendedResult ? promiseData : {
            message: promiseData || "",
            id: id || ""
          };
          this.create({
            id,
            type: "error",
            description,
            ...toastSettings
          });
        } else if (data.success !== void 0) {
          shouldDismiss = false;
          const promiseData = typeof data.success === "function" ? await data.success(response) : data.success;
          const description = typeof data.description === "function" ? await data.description(response) : data.description;
          const isExtendedResult = typeof promiseData === "object" && !isVNode(promiseData);
          const toastSettings = isExtendedResult ? promiseData : {
            message: promiseData || "",
            id: id || ""
          };
          this.create({
            id,
            type: "success",
            description,
            ...toastSettings
          });
        }
      }).catch(async (error) => {
        result = ["reject", error];
        if (data.error !== void 0) {
          shouldDismiss = false;
          const promiseData = typeof data.error === "function" ? await data.error(error) : data.error;
          const description = typeof data.description === "function" ? await data.description(error) : data.description;
          const isExtendedResult = typeof promiseData === "object" && !isVNode(promiseData);
          const toastSettings = isExtendedResult ? promiseData : {
            message: promiseData || "",
            id: id || ""
          };
          this.create({
            id,
            type: "error",
            description,
            ...toastSettings
          });
        }
      }).finally(() => {
        var _a;
        if (shouldDismiss) {
          this.dismiss(id);
          id = void 0;
        }
        (_a = data.finally) == null ? void 0 : _a.call(data);
      });
      const unwrap = () => new Promise((resolve, reject) => originalPromise.then(() => result[0] === "reject" ? reject(result[1]) : resolve(result[1])).catch(reject));
      if (typeof id !== "string" && typeof id !== "number") return { unwrap };
      else return Object.assign(id, { unwrap });
    });
    __publicField(this, "custom", (component, data) => {
      const id = (data == null ? void 0 : data.id) || toastsCounter++;
      const alreadyExists = this.toasts.find((toast$1) => {
        return toast$1.id === id;
      });
      const dismissible = (data == null ? void 0 : data.dismissible) === void 0 ? true : data.dismissible;
      if (this.dismissedToasts.has(id)) this.dismissedToasts.delete(id);
      if (alreadyExists) this.toasts = this.toasts.map((toast$1) => {
        if (toast$1.id === id) {
          this.publish({
            ...toast$1,
            component,
            dismissible,
            id,
            ...data
          });
          return {
            ...toast$1,
            component,
            dismissible,
            id,
            ...data
          };
        }
        return toast$1;
      });
      else this.addToast({
        component,
        dismissible,
        id,
        ...data
      });
      return id;
    });
    __publicField(this, "getActiveToasts", () => {
      return this.toasts.filter((toast$1) => !this.dismissedToasts.has(toast$1.id));
    });
    this.subscribers = [];
    this.toasts = [];
    this.dismissedToasts = /* @__PURE__ */ new Set();
  }
};
const ToastState = new Observer();
function toastFunction(message, data) {
  const id = (data == null ? void 0 : data.id) || toastsCounter++;
  ToastState.create({
    message,
    id,
    type: "default",
    ...data
  });
  return id;
}
const isHttpResponse = (data) => {
  return data && typeof data === "object" && "ok" in data && typeof data.ok === "boolean" && "status" in data && typeof data.status === "number";
};
const basicToast = toastFunction;
const getHistory = () => ToastState.toasts;
const getToasts = () => ToastState.getActiveToasts();
const toast = Object.assign(basicToast, {
  success: ToastState.success,
  info: ToastState.info,
  warning: ToastState.warning,
  error: ToastState.error,
  custom: ToastState.custom,
  message: ToastState.message,
  promise: ToastState.promise,
  dismiss: ToastState.dismiss,
  loading: ToastState.loading
}, {
  getHistory,
  getToasts
});
const _sfc_main = {
  __name: "registrasi",
  __ssrInlineRender: true,
  setup(__props) {
    const config = useRuntimeConfig();
    const apiBase = config.public.apiBase;
    const currentStep = ref(1);
    const isLoading = ref(false);
    const form = reactive({
      name: "",
      masjid_name: "",
      email: "",
      password: "",
      address: "",
      province_id: "",
      city_id: "",
      district_id: "",
      village_id: "",
      phone: "",
      type: "masjid"
    });
    const errors = reactive({});
    const provinces = ref([]);
    const cities = ref([]);
    const districts = ref([]);
    const villages = ref([]);
    const loadingProvinces = ref(false);
    const loadingCities = ref(false);
    const loadingDistricts = ref(false);
    const loadingVillages = ref(false);
    watch(() => form.province_id, async (newVal) => {
      form.city_id = "";
      form.district_id = "";
      form.village_id = "";
      cities.value = [];
      districts.value = [];
      villages.value = [];
      if (!newVal) return;
      loadingCities.value = true;
      try {
        const data = await $fetch(`${apiBase}/wilayah?type=regencies&parent_id=${newVal}`);
        cities.value = Array.isArray(data) ? data : [];
      } catch (err) {
        toast.error("Gagal memuat data kota/kabupaten");
      } finally {
        loadingCities.value = false;
      }
    });
    watch(() => form.city_id, async (newVal) => {
      form.district_id = "";
      form.village_id = "";
      districts.value = [];
      villages.value = [];
      if (!newVal) return;
      loadingDistricts.value = true;
      try {
        const data = await $fetch(`${apiBase}/wilayah?type=districts&parent_id=${newVal}`);
        districts.value = Array.isArray(data) ? data : [];
      } catch (err) {
        toast.error("Gagal memuat data kecamatan");
      } finally {
        loadingDistricts.value = false;
      }
    });
    watch(() => form.district_id, async (newVal) => {
      form.village_id = "";
      villages.value = [];
      if (!newVal) return;
      loadingVillages.value = true;
      try {
        const data = await $fetch(`${apiBase}/wilayah?type=villages&parent_id=${newVal}`);
        villages.value = Array.isArray(data) ? data : [];
      } catch (err) {
        toast.error("Gagal memuat data kelurahan");
      } finally {
        loadingVillages.value = false;
      }
    });
    const inputClass = (field) => {
      const base = "w-full px-4 py-3 border rounded-xl focus:ring-2 focus:ring-[#166534] outline-none transition-all";
      return errors[field] ? base + " border-red-400 bg-red-50" : base + " border-gray-200";
    };
    return (_ctx, _push, _parent, _attrs) => {
      const _component_NuxtLink = __nuxt_component_0;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "bg-gray-50 min-h-screen" }, _attrs))}><div class="flex min-h-screen"><div class="hidden lg:block lg:w-5/12 relative"><img${ssrRenderAttr("src", _imports_0)} alt="Islamic Architecture" class="absolute inset-0 w-full h-full object-cover"><div class="absolute inset-0 bg-black/20"></div></div><div class="w-full lg:w-7/12 flex items-center justify-center p-6 md:p-12"><div class="max-w-2xl w-full"><div class="flex items-center justify-center lg:justify-start gap-2 mb-8"><img${ssrRenderAttr("src", _imports_1)} alt="Logo Sajada" class="h-8 w-auto"></div><div class="mb-10"><div class="flex items-center justify-between relative"><div class="absolute top-1/2 left-0 w-full h-0.5 bg-gray-200 -z-10 transform -translate-y-1/2"></div><!--[-->`);
      ssrRenderList([1, 2, 3], (step) => {
        _push(`<div class="flex flex-col items-center bg-gray-50 px-2"><div class="${ssrRenderClass(["w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white transition-colors duration-300 font-bold", unref(currentStep) >= step ? "border-[#166534] text-[#166534]" : "border-gray-300 text-gray-400"])}">`);
        if (step === 1) {
          _push(`<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16"></path></svg>`);
        } else {
          _push(`<!---->`);
        }
        if (step === 2) {
          _push(`<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>`);
        } else {
          _push(`<!---->`);
        }
        if (step === 3) {
          _push(`<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>`);
        } else {
          _push(`<!---->`);
        }
        _push(`</div><span class="${ssrRenderClass(["text-xs mt-2 font-semibold", unref(currentStep) >= step ? "text-[#166534]" : "text-gray-400"])}">${ssrInterpolate(step === 1 ? "Profil" : step === 2 ? "Alamat" : "Kontak")}</span></div>`);
      });
      _push(`<!--]--></div></div><form><div style="${ssrRenderStyle(unref(currentStep) === 1 ? null : { display: "none" })}"><h3 class="text-2xl font-bold text-gray-800 mb-6">Informasi Profil Masjid</h3><div class="space-y-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Pilih Lembaga <span class="text-red-500">*</span></label><select class="${ssrRenderClass(inputClass("type"))}"><option value="masjid"${ssrIncludeBooleanAttr(Array.isArray(unref(form).type) ? ssrLooseContain(unref(form).type, "masjid") : ssrLooseEqual(unref(form).type, "masjid")) ? " selected" : ""}>Masjid</option><option value="musholla"${ssrIncludeBooleanAttr(Array.isArray(unref(form).type) ? ssrLooseContain(unref(form).type, "musholla") : ssrLooseEqual(unref(form).type, "musholla")) ? " selected" : ""}>Musholla</option><option value="surau"${ssrIncludeBooleanAttr(Array.isArray(unref(form).type) ? ssrLooseContain(unref(form).type, "surau") : ssrLooseEqual(unref(form).type, "surau")) ? " selected" : ""}>Surau</option><option value="yayasan"${ssrIncludeBooleanAttr(Array.isArray(unref(form).type) ? ssrLooseContain(unref(form).type, "yayasan") : ssrLooseEqual(unref(form).type, "yayasan")) ? " selected" : ""}>Yayasan</option></select></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Nama Masjid <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).masjid_name)} type="text" placeholder="Masukkan nama masjid" class="${ssrRenderClass(inputClass("masjid_name"))}">`);
      if (unref(errors).masjid_name) {
        _push(`<p class="text-red-500 text-xs mt-1">Nama masjid wajib diisi</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div></div></div><div style="${ssrRenderStyle(unref(currentStep) === 2 ? null : { display: "none" })}"><h3 class="text-2xl font-bold text-gray-800 mb-6">Lokasi Masjid</h3><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div class="md:col-span-2"><label class="block text-sm font-medium text-gray-700 mb-1">Alamat Lengkap <span class="text-red-500">*</span></label><textarea rows="2" placeholder="Jl. Raya No..." class="${ssrRenderClass(inputClass("address"))}">${ssrInterpolate(unref(form).address)}</textarea>`);
      if (unref(errors).address) {
        _push(`<p class="text-red-500 text-xs mt-1">Alamat wajib diisi</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div><div><label class="block text-sm font-medium text-gray-700 mb-1">Negara</label><select class="w-full px-4 py-3 border border-gray-200 rounded-xl outline-none bg-gray-50" disabled><option>Indonesia</option></select></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Provinsi <span class="text-red-500">*</span></label><select class="${ssrRenderClass(inputClass("province_id"))}"><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(form).province_id) ? ssrLooseContain(unref(form).province_id, "") : ssrLooseEqual(unref(form).province_id, "")) ? " selected" : ""}>${ssrInterpolate(unref(loadingProvinces) ? "Memuat..." : "Pilih Provinsi")}</option><!--[-->`);
      ssrRenderList(unref(provinces), (p) => {
        _push(`<option${ssrRenderAttr("value", p.code)}${ssrIncludeBooleanAttr(Array.isArray(unref(form).province_id) ? ssrLooseContain(unref(form).province_id, p.code) : ssrLooseEqual(unref(form).province_id, p.code)) ? " selected" : ""}>${ssrInterpolate(p.name)}</option>`);
      });
      _push(`<!--]--></select>`);
      if (unref(errors).province_id) {
        _push(`<p class="text-red-500 text-xs mt-1">Provinsi wajib dipilih</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div><div><label class="block text-sm font-medium text-gray-700 mb-1">Kota/Kabupaten <span class="text-red-500">*</span></label><select class="${ssrRenderClass(inputClass("city_id"))}"><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(form).city_id) ? ssrLooseContain(unref(form).city_id, "") : ssrLooseEqual(unref(form).city_id, "")) ? " selected" : ""}>${ssrInterpolate(unref(loadingCities) ? "Memuat..." : "Pilih Kota")}</option><!--[-->`);
      ssrRenderList(unref(cities), (c) => {
        _push(`<option${ssrRenderAttr("value", c.code)}${ssrIncludeBooleanAttr(Array.isArray(unref(form).city_id) ? ssrLooseContain(unref(form).city_id, c.code) : ssrLooseEqual(unref(form).city_id, c.code)) ? " selected" : ""}>${ssrInterpolate(c.name)}</option>`);
      });
      _push(`<!--]--></select>`);
      if (unref(errors).city_id) {
        _push(`<p class="text-red-500 text-xs mt-1">Kota wajib dipilih</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div><div><label class="block text-sm font-medium text-gray-700 mb-1">Kecamatan <span class="text-red-500">*</span></label><select class="${ssrRenderClass(inputClass("district_id"))}"><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(form).district_id) ? ssrLooseContain(unref(form).district_id, "") : ssrLooseEqual(unref(form).district_id, "")) ? " selected" : ""}>${ssrInterpolate(unref(loadingDistricts) ? "Memuat..." : "Pilih Kecamatan")}</option><!--[-->`);
      ssrRenderList(unref(districts), (d) => {
        _push(`<option${ssrRenderAttr("value", d.code)}${ssrIncludeBooleanAttr(Array.isArray(unref(form).district_id) ? ssrLooseContain(unref(form).district_id, d.code) : ssrLooseEqual(unref(form).district_id, d.code)) ? " selected" : ""}>${ssrInterpolate(d.name)}</option>`);
      });
      _push(`<!--]--></select>`);
      if (unref(errors).district_id) {
        _push(`<p class="text-red-500 text-xs mt-1">Kecamatan wajib dipilih</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div><div class="md:col-span-2"><label class="block text-sm font-medium text-gray-700 mb-1">Kelurahan <span class="text-red-500">*</span></label><select class="${ssrRenderClass(inputClass("village_id"))}"><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(form).village_id) ? ssrLooseContain(unref(form).village_id, "") : ssrLooseEqual(unref(form).village_id, "")) ? " selected" : ""}>${ssrInterpolate(unref(loadingVillages) ? "Memuat..." : "Pilih Kelurahan")}</option><!--[-->`);
      ssrRenderList(unref(villages), (v) => {
        _push(`<option${ssrRenderAttr("value", v.code)}${ssrIncludeBooleanAttr(Array.isArray(unref(form).village_id) ? ssrLooseContain(unref(form).village_id, v.code) : ssrLooseEqual(unref(form).village_id, v.code)) ? " selected" : ""}>${ssrInterpolate(v.name)}</option>`);
      });
      _push(`<!--]--></select>`);
      if (unref(errors).village_id) {
        _push(`<p class="text-red-500 text-xs mt-1">Kelurahan wajib dipilih</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div></div></div><div style="${ssrRenderStyle(unref(currentStep) === 3 ? null : { display: "none" })}"><h3 class="text-2xl font-bold text-gray-800 mb-6">Kontak Penanggung Jawab</h3><div class="space-y-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Nama Lengkap <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).name)} type="text" placeholder="Nama pengelola/takmir" class="${ssrRenderClass(inputClass("name"))}">`);
      if (unref(errors).name) {
        _push(`<p class="text-red-500 text-xs mt-1">Nama wajib diisi</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div><div><label class="block text-sm font-medium text-gray-700 mb-1">Alamat Domisili</label><input type="text" placeholder="Alamat tinggal" class="w-full px-4 py-3 border border-gray-200 rounded-xl focus:ring-2 focus:ring-[#166534] outline-none"></div><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Email <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).email)} type="email" placeholder="email@contoh.com" class="${ssrRenderClass(inputClass("email"))}">`);
      if (unref(errors).email) {
        _push(`<p class="text-red-500 text-xs mt-1">Email wajib diisi</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div><div><label class="block text-sm font-medium text-gray-700 mb-1">No. Telp / WhatsApp <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).phone)} type="tel" placeholder="08xxxxxxxxxx" class="${ssrRenderClass(inputClass("phone"))}">`);
      if (unref(errors).phone) {
        _push(`<p class="text-red-500 text-xs mt-1">Nomor telepon wajib diisi</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Kata Sandi <span class="text-red-500">*</span></label><input${ssrRenderAttr("value", unref(form).password)} type="password" placeholder="Min. 8 Karakter" class="${ssrRenderClass(inputClass("password"))}">`);
      if (unref(errors).password) {
        _push(`<p class="text-red-500 text-xs mt-1">Password wajib diisi (min. 8 karakter)</p>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div></div></div><div class="mt-10 flex gap-4">`);
      if (unref(currentStep) > 1) {
        _push(`<button type="button" class="flex-1 px-6 py-3.5 border border-gray-200 text-gray-600 font-semibold rounded-xl hover:bg-gray-100 transition-all">Sebelumnya</button>`);
      } else {
        _push(`<!---->`);
      }
      _push(`<button type="button"${ssrIncludeBooleanAttr(unref(isLoading)) ? " disabled" : ""} class="${ssrRenderClass(["flex-[2] text-white font-semibold py-3.5 rounded-xl shadow-lg transition-all transform active:scale-95 flex items-center justify-center gap-2", unref(currentStep) === 3 ? "bg-[#D4AF37] hover:bg-[#b8962e]" : "bg-[#166534] hover:bg-[#0f4a26]", unref(isLoading) ? "opacity-50 cursor-not-allowed" : ""])}">`);
      if (unref(isLoading) && unref(currentStep) === 3) {
        _push(`<svg class="animate-spin h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="#065f46" stroke-width="4"></circle><path class="opacity-75" fill="white" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>`);
      } else {
        _push(`<!---->`);
      }
      _push(` ${ssrInterpolate(unref(currentStep) === 3 ? unref(isLoading) ? "Mohon Tunggu..." : "Daftar Akun Masjid" : "Selanjutnya")}</button></div></form><div class="mt-8 text-center lg:text-left"><p class="text-gray-600">Sudah punya akun? `);
      _push(ssrRenderComponent(_component_NuxtLink, {
        to: "/login",
        class: "text-[#D4AF37] font-bold hover:underline"
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`Masuk Sekarang`);
          } else {
            return [
              createTextVNode("Masuk Sekarang")
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`</p></div></div></div></div></div>`);
    };
  }
};
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/registrasi.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};

export { _sfc_main as default };
//# sourceMappingURL=registrasi-Cz4gsoy-.mjs.map
