"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "OrdersView", {
    enumerable: true,
    get: function() {
        return OrdersView;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
const _listView = require("../../listView");
const _divider = require("../../divider");
const _cell = require("../../block/orders/cell");
const _toolbar = require("./toolbar");
const _defaultStaticStyle = require("../../statistic/defaultStaticStyle");
const _orderListContext = require("./shared/orderListContext");
const _provider = require("../../provider");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const OrdersView = (props)=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_orderListContext.OrderListProvider, {
        cancelOrder: props.cancelOrder,
        editOrder: props.editOrder,
        cancelAlgoOrder: props.cancelAlgoOrder,
        editAlgoOrder: props.editAlgoOrder,
        children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_defaultStaticStyle.StatisticStyleProvider, {
            labelClassName: "orderly-text-3xs orderly-text-base-contrast/30",
            children: [
                /*#__PURE__*/ (0, _jsxruntime.jsx)(_toolbar.Toolbar, {
                    onCancelAll: props.onCancelAll,
                    onShowAllSymbolChange: props.onShowAllSymbolChange,
                    showAllSymbol: props.showAllSymbol
                }),
                /*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {}),
                /*#__PURE__*/ (0, _jsxruntime.jsx)(_listView.ListView.separated, {
                    isLoading: props.isLoading,
                    dataSource: props.dataSource,
                    renderSeparator: (_, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {}),
                    renderItem: (item, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_provider.SymbolProvider, {
                            symbol: item.symbol,
                            children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_cell.OrderCell, {
                                order: item,
                                onSymbolChange: props.onSymbolChange
                            })
                        }),
                    loadMore: props.loadMore
                })
            ]
        })
    });
};

//# sourceMappingURL=orders.js.map