import { defineStore } from "pinia";
import { ref, computed } from "vue";

export const useAppStore = defineStore('app', () => {
  const activeState = ref(null);

  const setActiveState = (state) => {
    activeState.value = state;
  };

  const isSignUp = computed(() => activeState.value === "signUp");
  const isSignIn = computed(() => activeState.value === "signIn");
  const isForgot = computed(() => activeState.value === "reset-password");
  const isReset = computed(() => activeState.value === "new-password");

  return {
    activeState,
    setActiveState,

    isSignUp,
    isSignIn,
    isForgot,
    isReset
  };
});