/**
 * Environment Detection Utilities
 * 
 * Utilities for detecting development vs production environment
 * Used for visibility filtering of private documentation content
 */ /**
 * Check if the application is running in development mode
 * 
 * Development mode is determined by:
 * 1. NODE_ENV !== 'production'
 * 2. DEVDOC_DEV_MODE env var is set to 'true' (set by devdoc dev command)
 * 
 * @returns true if in development mode, false if in production
 */ export function isDevMode() {
    return process.env.NODE_ENV !== 'production' || process.env.DEVDOC_DEV_MODE === 'true';
}
/**
 * Check if the application is running in production mode
 * 
 * @returns true if in production mode, false if in development
 */ export function isProductionMode() {
    return !isDevMode();
}
/**
 * Check if an item should be visible based on its visibility setting
 * 
 * @param visibility - The visibility setting ('public', 'private', or undefined)
 * @param devMode - Whether we're in development mode (defaults to isDevMode())
 * @returns true if the item should be shown, false if it should be hidden
 */ export function shouldShowItem(visibility, devMode) {
    const isDev = devMode ?? isDevMode();
    // Private items are only visible in dev mode
    if (visibility === 'private') {
        return isDev;
    }
    // Public or undefined visibility = always show
    return true;
}
