import { useEffect } from 'atomico';
import 'toastr';
import 'funfix';
import { t as toastrMessage } from './chunks/496a9efa.js';

function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
function useAsyncHook(data, args) {
  useEffect(() => {
    data().then((r1) => {
      console.log(r1);
    }).catch((e) => {
      toastrMessage(e);
    });
  }, _nullishCoalesce(args, () => ( [])));
}

export { useAsyncHook };
