import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Divider } from "../../divider";
import { ListView } from "../../listView";
import { HistoryToolbar } from "./historyToolbar";
import { Cell } from "./cell";
import { StatisticStyleProvider } from "../../statistic/defaultStaticStyle";
import { SymbolProvider } from "../../provider";
export const HistoryListView = (props)=>{
    return /*#__PURE__*/ _jsx("div", {
        id: "orderly-order-history-mobile",
        children: /*#__PURE__*/ _jsxs(StatisticStyleProvider, {
            labelClassName: "orderly-text-3xs orderly-text-base-contrast/30",
            children: [
                /*#__PURE__*/ _jsx(HistoryToolbar, {
                    status: props.status,
                    side: props.side,
                    onSideChange: props.onSideChange,
                    onStatusChange: props.onStatusChange
                }),
                /*#__PURE__*/ _jsx(Divider, {}),
                /*#__PURE__*/ _jsx(ListView.separated, {
                    isLoading: props.isLoading,
                    dataSource: props.dataSource,
                    renderSeparator: (_, index)=>/*#__PURE__*/ _jsx(Divider, {}),
                    renderItem: (item, index)=>/*#__PURE__*/ _jsx(SymbolProvider, {
                            symbol: item.symbol,
                            children: /*#__PURE__*/ _jsx(Cell, {
                                item: item,
                                onSymbolChange: props.onSymbolChange
                            })
                        }),
                    loadMore: props.loadMore
                })
            ]
        })
    });
};

//# sourceMappingURL=historyListView.js.map