import { handleTokenUsage } from './token-usage-handler.js';
import { handleTokenIntelligence } from './token-intelligence-handler.js';
import { handleTokenOptimizerStatus } from './ecosystem-tools-handler.js';
import { handleTokenSavingsReport } from './token-savings-handler.js';
/**
 * Unified tokens handler — delegates to the appropriate sub-handler based on view.
 */
export async function handleTokens(args) {
    switch (args.view) {
        case 'usage':
            return handleTokenUsage({
                period: args.period,
                groupBy: args.groupBy,
            });
        case 'intelligence':
            return handleTokenIntelligence({
                period: args.period,
                groupBy: args.groupBy,
                view: args.intelligenceView,
                specId: args.specId,
                projectPath: args.projectPath,
            });
        case 'optimizer':
            return handleTokenOptimizerStatus({
                projectPath: args.projectPath ?? process.cwd(),
            });
        case 'savings':
            return handleTokenSavingsReport({
                period: args.period,
                projectPath: args.projectPath,
                projectId: args.projectId,
            });
    }
}
//# sourceMappingURL=tokens-handler.js.map