import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Divider } from "../../../divider";
import { ListView } from "../../../listView";
import { TokenCell } from "./tokenCell";
export const TokenListView = (props)=>{
    const renderItem = (item)=>{
        return /*#__PURE__*/ _jsx(TokenCell, {
            token: item,
            onItemClick: props.onItemClick,
            fetchBalance: props.fetchBalance
        });
    };
    const renderSeparator = ()=>{
        return /*#__PURE__*/ _jsx(Divider, {});
    };
    return /*#__PURE__*/ _jsxs(_Fragment, {
        children: [
            /*#__PURE__*/ _jsxs("div", {
                className: "orderly-token-select-list-header orderly-flex orderly-border-b orderly-border-base-contrast/20 orderly-py-2 orderly-mb-3",
                children: [
                    /*#__PURE__*/ _jsx("span", {
                        className: "orderly-flex-1 orderly-text-4xs orderly-text-base-contrast/50",
                        children: "Coin"
                    }),
                    /*#__PURE__*/ _jsx("span", {
                        className: "orderly-flex-1 orderly-text-4xs orderly-text-base-contrast/50",
                        children: "Wallet Balance"
                    })
                ]
            }),
            /*#__PURE__*/ _jsx(ListView.separated, {
                dataSource: props.tokens,
                renderItem: renderItem,
                renderSeparator: renderSeparator
            })
        ]
    });
};

//# sourceMappingURL=tokenListView.js.map