import { resetEnvMode } from '../../constants/key.mjs';
import { useGlobalConfig } from '../../hooks/base/useGlobalConfig/index.mjs';
import { envConfigs } from './http/createModes.mjs';

const getTenantType = () => {
  const hostname = typeof window !== "undefined" ? window.location.hostname : "";
  const importMetaEnv = useGlobalConfig("env");
  const mode = importMetaEnv.value[resetEnvMode];
  if (mode && envConfigs[mode]) {
    return envConfigs[mode].tenant;
  }
  const envConfig = Object.values(envConfigs).find((config) => config.domain === hostname);
  if (envConfig) {
    return envConfig.tenant;
  }
  return "giikin";
};
const isGiiktok = () => getTenantType() === "giiktok";
const isGiikin = () => getTenantType() === "giikin";

export { getTenantType, isGiikin, isGiiktok };
//# sourceMappingURL=tenant.mjs.map
