"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "Cell", {
    enumerable: true,
    get: function() {
        return Cell;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _icon = require("../../../icon");
const _provider = require("../../../provider");
const _text = require("../../../text");
const _react = require("react");
const Cell = (props)=>{
    const { item, onItemClick } = props;
    const { quote_dp } = (0, _react.useContext)(_provider.SymbolContext);
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
        className: "orderly-flex orderly-items-center orderly-gap-2 orderly-cursor-pointer",
        onClick: ()=>onItemClick?.(item),
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_icon.NetworkImage, {
                type: "symbol",
                symbol: item.symbol
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                className: "orderly-flex orderly-flex-1 orderly-flex-col",
                children: [
                    /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                        className: "orderly-flex orderly-items-center orderly-justify-between orderly-text-2xs",
                        children: [
                            /*#__PURE__*/ (0, _jsxruntime.jsx)(_text.Text, {
                                rule: "symbol",
                                className: "orderly-text-base-contrast",
                                children: item.symbol
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsx)(_text.Numeral, {
                                precision: quote_dp,
                                className: "orderly-text-base-contrast",
                                children: item["24h_close"]
                            })
                        ]
                    }),
                    /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                        className: "orderly-flex orderly-items-center orderly-justify-between orderly-text-4xs",
                        children: [
                            /*#__PURE__*/ (0, _jsxruntime.jsx)(_text.Numeral, {
                                rule: "human",
                                className: "orderly-text-base-contrast-54",
                                children: item?.["24h_amount"]
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsx)(_text.Numeral, {
                                rule: "percentages",
                                coloring: true,
                                children: item.change
                            })
                        ]
                    })
                ]
            })
        ]
    });
};

//# sourceMappingURL=cell.js.map