<script setup lang="ts">
  import { useAuthStore } from "../store/auth";
  import { Input, Button } from 'fp-ts-vue-ui';

  const authStore = useAuthStore();
  const formData = {
    email: '',
    password: ''
  };

  const login = async function () {
    await authStore.SIGN_IN(formData.email, formData.password);
    debugger;
  };

</script>

<template>
  <form @submit.prevent="login">

    <Input 
        class="input flex justify-center"
        id="id_email"
        type="text"
        label="Email"
        v-model.lazy="formData.email"
    />

    <Input 
        class="input flex justify-center"
        id="id_password"
        type="password"
        label="Password"
        v-model.lazy="formData.password"
    />
    <Button
        class="mt-5"
        label="Login"
    ></Button>
  </form>
</template>
