/**
 * amis-ui v6.14.0-beta.1
 * Copyright 2018-2025 fex
 */

import React__default from 'react';
import Draggable from 'react-draggable';
import { localeable, themeable } from 'amis-core';

/**
 * @file DndContainer
 * @desc 可拖拽容器
 */
var DndContainer = function (props) {
    var className = props.className, cx = props.classnames, children = props.children, axis = props.axis, position = props.position, defaultPosition = props.defaultPosition, bounds = props.bounds, grid = props.grid, handle = props.handle, cancel = props.cancel, draggable = props.draggable, scale = props.scale, enableUserSelect = props.enableUserSelect, nodeRef = props.nodeRef, onDrag = props.onDrag, onStart = props.onStart, onStop = props.onStop;
    return (React__default.createElement(Draggable, { axis: axis, position: position, defaultPosition: defaultPosition, bounds: bounds, grid: grid, handle: handle, cancel: cancel, disabled: !draggable, scale: scale, enableUserSelectHack: !enableUserSelect, nodeRef: nodeRef, defaultClassName: cx(className), defaultClassNameDragging: cx('DndContainer--dragging'), defaultClassNameDragged: cx('DndContainer--dragged'), onStart: onStart, onDrag: onDrag, onStop: onStop }, children));
};
DndContainer.defaultProps = {
    axis: 'both',
    scale: 1,
    enableUserSelect: false
};
var DndContainer$1 = localeable(themeable(DndContainer));

export { DndContainer$1 as default };
