import React from 'react';

export const useIsApplicationLoading = () => {
  const [isApplicationLoading, _setIsApplicationLoading] = React.useState<
    boolean
  >(false);

  const setIsApplicationLoading = React.useCallback(
    (currentIsLoadingApplication: boolean): void => {
      _setIsApplicationLoading(currentIsLoadingApplication);
    },
    []
  );

  return {
    isApplicationLoading,
    setIsApplicationLoading,
  };
};
