var $d3d8871226fc64f2$exports = require("./DragAndDrop.cjs");
var $jXExB$reactariauseDroppableCollection = require("react-aria/useDroppableCollection");
var $jXExB$reactariauseDraggableCollection = require("react-aria/useDraggableCollection");
var $jXExB$reactstatelyuseDraggableCollectionState = require("react-stately/useDraggableCollectionState");
var $jXExB$reactariaDragPreview = require("react-aria/DragPreview");
var $jXExB$reactstatelyuseDroppableCollectionState = require("react-stately/useDroppableCollectionState");
var $jXExB$reactariaprivatedndDragManager = require("react-aria/private/dnd/DragManager");
var $jXExB$react = require("react");
var $jXExB$reactariaListDropTargetDelegate = require("react-aria/ListDropTargetDelegate");


function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}

$parcel$export(module.exports, "useDragAndDrop", function () { return $e8875f03f2800be7$export$2cfc5be7a55829f6; });
/*
 * Copyright 2022 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */ 








function $e8875f03f2800be7$export$2cfc5be7a55829f6(options) {
    let dragAndDropHooks = (0, $jXExB$react.useMemo)(()=>{
        let { onDrop: onDrop, onInsert: onInsert, onItemDrop: onItemDrop, onReorder: onReorder, onMove: onMove, onRootDrop: onRootDrop, getItems: getItems, renderDragPreview: renderDragPreview, renderDropIndicator: renderDropIndicator, dropTargetDelegate: dropTargetDelegate } = options;
        let isDraggable = !!getItems;
        let isDroppable = !!(onDrop || onInsert || onItemDrop || onReorder || onMove || onRootDrop);
        let hooks = {};
        if (isDraggable) {
            hooks.useDraggableCollectionState = function useDraggableCollectionStateOverride(props) {
                return (0, $jXExB$reactstatelyuseDraggableCollectionState.useDraggableCollectionState)({
                    ...props,
                    ...options
                });
            };
            hooks.useDraggableCollection = (0, $jXExB$reactariauseDraggableCollection.useDraggableCollection);
            hooks.useDraggableItem = (0, $jXExB$reactariauseDraggableCollection.useDraggableItem);
            hooks.DragPreview = (0, $jXExB$reactariaDragPreview.DragPreview);
            hooks.renderDragPreview = renderDragPreview;
            hooks.isVirtualDragging = (0, $jXExB$reactariaprivatedndDragManager.isVirtualDragging);
        }
        if (isDroppable) {
            hooks.useDroppableCollectionState = function useDroppableCollectionStateOverride(props) {
                return (0, $jXExB$reactstatelyuseDroppableCollectionState.useDroppableCollectionState)({
                    ...props,
                    ...options
                });
            };
            hooks.useDroppableItem = (0, $jXExB$reactariauseDroppableCollection.useDroppableItem);
            hooks.useDroppableCollection = function useDroppableCollectionOverride(props, state, ref) {
                return (0, $jXExB$reactariauseDroppableCollection.useDroppableCollection)({
                    ...props,
                    ...options
                }, state, ref);
            };
            hooks.useDropIndicator = (0, $jXExB$reactariauseDroppableCollection.useDropIndicator);
            hooks.renderDropIndicator = renderDropIndicator;
            hooks.dropTargetDelegate = dropTargetDelegate;
            hooks.ListDropTargetDelegate = (0, $jXExB$reactariaListDropTargetDelegate.ListDropTargetDelegate);
        }
        return hooks;
    }, [
        options
    ]);
    return {
        dragAndDropHooks: dragAndDropHooks
    };
}


//# sourceMappingURL=useDragAndDrop.cjs.map
