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

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('react');
var Draggable = require('react-draggable');
var amisCore = require('amis-core');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var Draggable__default = /*#__PURE__*/_interopDefaultLegacy(Draggable);

var __react_jsx__ = require('react');
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
(__react_jsx__["default"] || __react_jsx__).Fragment;
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 (_J$X_(Draggable__default["default"], { 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 = amisCore.localeable(amisCore.themeable(DndContainer));

exports["default"] = DndContainer$1;
