import { reactive, ref } from "vue";

export function createAuthStore() {
  const csrf = ref(sessionStorage.getItem("ymhut.csrf") || "");
  const captcha = ref<any | null>(null);
  const bootstrap = ref<any | null>(null);
  const loginForm = reactive({ username: "", password: "", captcha: "" });
  const passwordForm = reactive({ currentPassword: "", newPassword: "" });

  return { csrf, captcha, bootstrap, loginForm, passwordForm };
}
