"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "MarketListView", {
    enumerable: true,
    get: function() {
        return MarketListView;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _listView = require("../../../listView");
const _divider = require("../../../divider");
const _react = require("react");
const _sortGroup = require("../../../block/markets/sections/sortGroup");
const _cell = require("./cell");
const _provider = require("../../../provider");
const MarketListView = (props)=>{
    const renderItem = (0, _react.useCallback)((item)=>{
        return /*#__PURE__*/ (0, _jsxruntime.jsx)(_provider.SymbolProvider, {
            symbol: item.symbol,
            children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_cell.Cell, {
                item: item,
                onItemClick: props.onItemClick
            })
        });
    }, []);
    const renderSeparator = (0, _react.useCallback)(()=>{
        return /*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {
            className: "orderly-my-[16px]"
        });
    }, []);
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_sortGroup.SortGroup, {
                onChange: props.onSort,
                readLastSortCondition: true
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {}),
            /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
                className: "orderly-overflow-y-auto orderly-overflow-hidden orderly-scrollbar-hidden orderly-hide-scrollbar orderly-my-2",
                style: {
                    height: props.listHeight
                },
                children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_listView.ListView.separated, {
                    dataSource: props.dataSource,
                    renderItem: renderItem,
                    renderSeparator: renderSeparator,
                    contentClassName: "orderly-space-y-[16px]",
                    className: "orderly-py-[16px]"
                })
            })
        ]
    });
};

//# sourceMappingURL=listView.js.map