import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { NetworkImage } from "../../../icon";
import { SymbolContext } from "../../../provider";
import { Numeral, Text } from "../../../text";
import { useContext } from "react";
export const Cell = (props)=>{
    const { item, onItemClick } = props;
    const { quote_dp } = useContext(SymbolContext);
    return /*#__PURE__*/ _jsxs("div", {
        className: "orderly-flex orderly-items-center orderly-gap-2 orderly-cursor-pointer",
        onClick: ()=>onItemClick?.(item),
        children: [
            /*#__PURE__*/ _jsx(NetworkImage, {
                type: "symbol",
                symbol: item.symbol
            }),
            /*#__PURE__*/ _jsxs("div", {
                className: "orderly-flex orderly-flex-1 orderly-flex-col",
                children: [
                    /*#__PURE__*/ _jsxs("div", {
                        className: "orderly-flex orderly-items-center orderly-justify-between orderly-text-2xs",
                        children: [
                            /*#__PURE__*/ _jsx(Text, {
                                rule: "symbol",
                                className: "orderly-text-base-contrast",
                                children: item.symbol
                            }),
                            /*#__PURE__*/ _jsx(Numeral, {
                                precision: quote_dp,
                                className: "orderly-text-base-contrast",
                                children: item["24h_close"]
                            })
                        ]
                    }),
                    /*#__PURE__*/ _jsxs("div", {
                        className: "orderly-flex orderly-items-center orderly-justify-between orderly-text-4xs",
                        children: [
                            /*#__PURE__*/ _jsx(Numeral, {
                                rule: "human",
                                className: "orderly-text-base-contrast-54",
                                children: item?.["24h_amount"]
                            }),
                            /*#__PURE__*/ _jsx(Numeral, {
                                rule: "percentages",
                                coloring: true,
                                children: item.change
                            })
                        ]
                    })
                ]
            })
        ]
    });
};

//# sourceMappingURL=cell.js.map