import React, { memo } from "react";
import { useContainer, useGetChart, useDashboardAttributes } from "../../charts/charts";
import { ChartHeadsWrapper, useChartHeadDuration } from "../../charts/chartHead";
import { HeadMain } from "./head-main";
const HeadMainContainer = ({ id, uuid = "", ...rest }) => {
    const container = useContainer();
    const getChart = useGetChart();
    const { width } = container.getBoundingClientRect();
    const duration = useChartHeadDuration(width, 1);
    const { host, nodeIDs, ...restAttributes } = useDashboardAttributes();
    return (React.createElement(ChartHeadsWrapper, Object.assign({}, rest),
        React.createElement(HeadMain, { getChart: getChart, duration: duration, host: host, nodeIDs: nodeIDs, commonAttributesOverrides: restAttributes, id: `${id}-${uuid}` })));
};
export default memo(HeadMainContainer);
//# sourceMappingURL=headMainContainer.js.map