import { useModal } from "queenjs";
import { defineComponent } from "vue";
import ResetForm from "./ResetForm";
import { useAuth } from "@queenjs-modules/auth";

export default defineComponent({
  setup() {
    const modal = useModal();
    const auth = useAuth();

    return () => {
      return (
        <ResetForm
          onSuccess={() => {
            modal.cancel();
            auth.actions.logout();
          }}
        />
      );
    };
  },
});
