import React from 'react';
import { ReactSortable } from 'react-sortablejs';
import { SortableStyle } from './SortableStyle';
export default function Sortable({ list, group, enableBorder = false, renderItem, setList, className, }) {
    return (React.createElement("div", { className: enableBorder ? 'shadow-xs rounded-lg bg-white border border-gray-200' : '' },
        React.createElement(SortableStyle, null),
        React.createElement(ReactSortable, { list: list, setList: (val) => {
                setList(val);
            }, group: group, animation: 150, fallbackOnBody: true, handle: '.drag-item', swapThreshold: 0.65, chosenClass: 'phx-item-chosen', ghostClass: 'phx-item-ghost', dragClass: 'phx-item-drag', className: `${className} flex flex-col gap-2` }, list.map((item, index) => (React.createElement("div", { key: item.id }, renderItem(item, index)))))));
}
//# sourceMappingURL=Sortable.js.map