import { ref, reactive, mergeProps, unref, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderAttr, ssrIncludeBooleanAttr, ssrRenderClass, ssrInterpolate } from 'vue/server-renderer';
import { _ as _imports_0 } from './virtual_public-B_E1G3G9.mjs';
import { _ as _imports_1 } from './virtual_public-LAo3x5RE.mjs';
import { a as useRoute, u as useRuntimeConfig } from './server.mjs';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
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 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import 'vue-router';

const _sfc_main = {
  __name: "reset-password",
  __ssrInlineRender: true,
  setup(__props) {
    const route = useRoute();
    const config = useRuntimeConfig();
    config.public.apiBase;
    const isLoading = ref(false);
    const form = reactive({
      token: route.query.token || "",
      email: route.query.email || "",
      password: "",
      password_confirmation: ""
    });
    return (_ctx, _push, _parent, _attrs) => {
      _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-1/2 relative"><img${ssrRenderAttr("src", _imports_0)} alt="Masjid" 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-1/2 flex items-center justify-center p-8 md:p-16"><div class="max-w-md 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-8 text-center lg:text-left"><h1 class="text-3xl font-bold text-gray-800 mb-2">Atur Ulang Kata Sandi</h1><p class="text-gray-600">Silakan masukkan kata sandi baru Anda di bawah ini.</p></div><form class="space-y-5"><input type="hidden"${ssrRenderAttr("value", unref(form).token)}><input type="hidden"${ssrRenderAttr("value", unref(form).email)}><div><label class="block text-sm font-medium text-gray-700 mb-1">Kata Sandi Baru</label><div class="relative"><span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-400"><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="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 118 0v4h-8z"></path></svg></span><input${ssrRenderAttr("value", unref(form).password)} type="password" placeholder="Minimal 8 karakter" class="w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl focus:ring-2 focus:ring-[#166534] outline-none"></div></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Konfirmasi Kata Sandi Baru</label><div class="relative"><span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-400"><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="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 118 0v4h-8z"></path></svg></span><input${ssrRenderAttr("value", unref(form).password_confirmation)} type="password" placeholder="Ulangi kata sandi baru" class="w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl focus:ring-2 focus:ring-[#166534] outline-none"></div></div><button type="submit"${ssrIncludeBooleanAttr(unref(isLoading)) ? " disabled" : ""} class="${ssrRenderClass(["w-full bg-[#D4AF37] hover:bg-[#b8962e] text-white font-semibold py-3.5 rounded-xl shadow-lg transition-all transform active:scale-[0.98] flex items-center justify-center gap-2", unref(isLoading) ? "opacity-50 cursor-not-allowed" : ""])}">`);
      if (unref(isLoading)) {
        _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(isLoading) ? "Memproses..." : "Simpan Password Baru")}</button></form></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/reset-password.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};

export { _sfc_main as default };
//# sourceMappingURL=reset-password-BfMXYrsD.mjs.map
