import path from 'node:path';
export const DEFAULT_DOMAIN = 'www.aci.local';
export const DEFAULT_LOCALE = 'en-us';
export function activeDomain(env = process.env) {
    return env.ACI_DOMAIN || DEFAULT_DOMAIN;
}
export function activeLocale(env = process.env) {
    return (env.ACI_LOCALE || DEFAULT_LOCALE).toLowerCase();
}
export function normalizeRoute(route) {
    const trimmed = String(route || '').trim();
    if (!trimmed || trimmed === '/') {
        return '/';
    }
    return `/${trimmed.replace(/^\/+/, '').replace(/\/+$/, '')}`;
}
/**
 * Returns the root directory for compiled content output.
 * Reads from ACI_CONTENT_ROOT or defaults to `.aci/compiled` relative to cwd.
 */
export function compiledContentRoot(env = process.env) {
    return env.ACI_CONTENT_ROOT || path.resolve(process.cwd(), '.aci/compiled');
}
