import { ref } from 'vue';

const authDialog = ref<any>();

export const useAuthorize = () => {
  const auth = async() => {
    console.log(authDialog.value);
    const res = await authDialog.value?.auth();
    console.log(res);
    return res;
  };

  const setAuthDialog = (v: any) => {
    authDialog.value = v;
  };

  return {
    auth,
    setAuthDialog,
  };
};
