"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "PositionsView", {
    enumerable: true,
    get: function() {
        return PositionsView;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _divider = require("../../divider");
const _cell = require("./cell");
const _overview = require("./overview");
const _listView = require("../../listView");
const _defaultStaticStyle = require("../../statistic/defaultStaticStyle");
const _provider = require("../../provider");
const PositionsView = (props)=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
        id: "orderly-positions-mobile",
        children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_defaultStaticStyle.StatisticStyleProvider, {
            labelClassName: "orderly-text-3xs orderly-text-base-contrast/30",
            valueClassName: "orderly-text-base-contrast/80",
            children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                children: [
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_overview.PositionOverview, {
                        onMarketCloseAll: props.onMarketCloseAll,
                        aggregated: props.aggregated,
                        onShowAllSymbolChange: props.onShowAllSymbolChange,
                        showAllSymbol: props.showAllSymbol
                    }),
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {}),
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
                        children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_listView.ListView.separated, {
                            dataSource: props.dataSource,
                            renderItem: (item, index)=>{
                                return /*#__PURE__*/ (0, _jsxruntime.jsx)(_provider.SymbolProvider, {
                                    symbol: item.symbol,
                                    children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_cell.PositionCell, {
                                        item: item,
                                        onLimitClose: props.onLimitClose,
                                        onMarketClose: props.onMarketClose,
                                        onSymbolChange: props.onSymbolChange,
                                        onTPSLOrder: props.onTPSLOrder
                                    })
                                });
                            },
                            renderSeparator: (item, index)=>{
                                return /*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {}, index);
                            },
                            loadMore: props.loadMore
                        })
                    })
                ]
            })
        })
    });
};

//# sourceMappingURL=positions.js.map