import { ConfigService } from '../../configService';
import { useUser } from '../../utilities/auth/useUser';
import { useMemo } from 'react';
export const APP_RIBBON_SPACE = 25;
export const useBuildEnvironment = () => {
    const user = useUser();
    const buildEnvironment = useMemo(() => {
        var _a;
        const env = ConfigService.config.UNITY_ENVIRONMENT;
        if (!['development', 'staging', 'production', 'build'].includes(env === null || env === void 0 ? void 0 : env.toLowerCase()) || (env === 'production' && !((_a = user === null || user === void 0 ? void 0 : user.can) === null || _a === void 0 ? void 0 : _a.CAN_VIEW_PROD_APP_RIBBON)))
            return undefined;
        return env === null || env === void 0 ? void 0 : env.toLowerCase();
    }, [user]);
    return buildEnvironment;
};
//# sourceMappingURL=useBuildEnvironment.js.map