import { jsx as _jsx } from "react/jsx-runtime";
import { createElement as _createElement } from "react";
import { useMemo } from "react";
import { MarketPrice } from "./marketPrice";
import { FundingRate } from "./fundingRate";
const MarketOverviewItem = {
    price: MarketPrice,
    fundingRate: FundingRate
};
export const MarketOverview = ({ items })=>{
    const children = useMemo(()=>{
        if (!items) return null;
        return Object.keys(items).map((key)=>{
            const item = key;
            const Comp = MarketOverviewItem[item];
            if (!Comp) return null;
            return /*#__PURE__*/ _createElement(Comp, {
                ...items[item],
                key: item
            });
        });
    }, [
        items
    ]);
    return /*#__PURE__*/ _jsx("div", {
        className: "orderly-flex orderly-gap-5",
        children: children
    });
};

//# sourceMappingURL=marketOverview.js.map