import { netdataDashboard } from "../../utils/netdata-dashboard";
export const generateHeadCharts = (type, chart, duration) => {
    // todo don't add head charts on print view
    // if (urlOptions.mode === 'print') {
    //   return '';
    // }
    const hcharts = netdataDashboard.anyAttribute(netdataDashboard.context, type, chart.context, []);
    return hcharts.map((hChart) => (typeof hChart === "function"
        ? hChart(netdataDashboard.os, chart.id)
            .replace(/CHART_DURATION/g, duration.toString())
            .replace(/CHART_UNIQUE_ID/g, chart.id)
        : hChart.replace(/CHART_DURATION/g, duration.toString())
            .replace(/CHART_UNIQUE_ID/g, chart.id)));
};
//# sourceMappingURL=generate-head-charts.js.map