import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import Sortable from "../DragSortList/index.js";
import React from "react";
//#region src/components/sortableList/index.tsx
const defaultActivationConstraint = { distance: 5 };
const SortableList = (props) => {
	const { dataSource, onChange, rowKey, renderItem, activationConstraint = defaultActivationConstraint } = props;
	return /* @__PURE__ */ React.createElement(Sortable, {
		list: dataSource,
		rowKey,
		onChange,
		activationConstraint
	}, (params) => {
		const { item, index, props: p, attributes, listeners, style } = params;
		return /* @__PURE__ */ React.createElement("div", _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, p), attributes), listeners), {}, { style }), renderItem === null || renderItem === void 0 ? void 0 : renderItem(item, index));
	});
};
//#endregion
export { SortableList as default };
