import type { GlobConfig } from '/#/config';

import { warn } from '@/utils/log';
import { getAppEnvConfig } from '@/utils/env';

export const useGlobSetting = (): Readonly<GlobConfig> => {
  const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL_PREFIX } = getAppEnvConfig();

  // Take global configuration
  const glob: Readonly<GlobConfig> = {
    title: VITE_GLOB_APP_TITLE,

    urlPrefix: VITE_GLOB_API_URL_PREFIX || '',
  };
  return glob as Readonly<GlobConfig>;
};
