import { RECIPE_IDS, runRecipe, analyticsWindow, } from './recipes.js';
const DEFAULT_ORDER = [
    'harness-mix',
    'model-mix',
    'session-volume',
    'token-ratio',
    'tools-per-session',
    'secrets-hot',
    'browser-activity',
    'resource-mix',
];
export function buildMixDashboard(opts = {}) {
    const t0 = Date.now();
    const win = analyticsWindow(opts.days ?? 7);
    const ids = opts.ids ?? DEFAULT_ORDER;
    const sections = [];
    for (const id of ids) {
        if (!RECIPE_IDS.includes(id))
            continue;
        const section = runRecipe(id, win);
        if (section.empty)
            continue;
        sections.push(section);
    }
    return {
        window: win,
        durationMs: Date.now() - t0,
        sections,
    };
}
/** @deprecated Use buildMixDashboard. */
export const buildTrendsDashboard = buildMixDashboard;
export { analyticsWindow, analyticsWindow as trendsWindow, runRecipe, RECIPE_IDS, };
