import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ListView } from ".";
import { Fragment, useMemo } from "react";
export const SeparatedListView = (props)=>{
    const { renderSeparator, renderItem, ...rest } = props;
    const length = useMemo(()=>props.dataSource?.length ?? 0, [
        props.dataSource
    ]);
    return /*#__PURE__*/ _jsx(ListView, {
        renderItem: (item, index)=>/*#__PURE__*/ _jsxs(Fragment, {
                children: [
                    renderItem(item, index),
                    index + 1 < length ? renderSeparator?.(item, index) : null
                ]
            }, index),
        ...rest
    });
};

//# sourceMappingURL=separated.js.map