import {DragAndDropContext as $f9554a667e4f0374$export$d188a835a7bc5783, DropIndicator as $f9554a667e4f0374$export$62ed72bc21f6b8a6, DropIndicatorContext as $f9554a667e4f0374$export$f55761759794cf55} from "./DragAndDrop.mjs";
import {useDroppableItem as $6P4UV$useDroppableItem, useDroppableCollection as $6P4UV$useDroppableCollection, useDropIndicator as $6P4UV$useDropIndicator} from "react-aria/useDroppableCollection";
import {useDraggableCollection as $6P4UV$useDraggableCollection, useDraggableItem as $6P4UV$useDraggableItem} from "react-aria/useDraggableCollection";
import {useDraggableCollectionState as $6P4UV$useDraggableCollectionState} from "react-stately/useDraggableCollectionState";
import {DragPreview as $6P4UV$DragPreview} from "react-aria/DragPreview";
import {useDroppableCollectionState as $6P4UV$useDroppableCollectionState} from "react-stately/useDroppableCollectionState";
import {isVirtualDragging as $6P4UV$isVirtualDragging} from "react-aria/private/dnd/DragManager";
import {useMemo as $6P4UV$useMemo} from "react";
import {ListDropTargetDelegate as $6P4UV$ListDropTargetDelegate} from "react-aria/ListDropTargetDelegate";

/*
 * 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 $32ef394310635fd5$export$2cfc5be7a55829f6(options) {
    let dragAndDropHooks = (0, $6P4UV$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, $6P4UV$useDraggableCollectionState)({
                    ...props,
                    ...options
                });
            };
            hooks.useDraggableCollection = (0, $6P4UV$useDraggableCollection);
            hooks.useDraggableItem = (0, $6P4UV$useDraggableItem);
            hooks.DragPreview = (0, $6P4UV$DragPreview);
            hooks.renderDragPreview = renderDragPreview;
            hooks.isVirtualDragging = (0, $6P4UV$isVirtualDragging);
        }
        if (isDroppable) {
            hooks.useDroppableCollectionState = function useDroppableCollectionStateOverride(props) {
                return (0, $6P4UV$useDroppableCollectionState)({
                    ...props,
                    ...options
                });
            };
            hooks.useDroppableItem = (0, $6P4UV$useDroppableItem);
            hooks.useDroppableCollection = function useDroppableCollectionOverride(props, state, ref) {
                return (0, $6P4UV$useDroppableCollection)({
                    ...props,
                    ...options
                }, state, ref);
            };
            hooks.useDropIndicator = (0, $6P4UV$useDropIndicator);
            hooks.renderDropIndicator = renderDropIndicator;
            hooks.dropTargetDelegate = dropTargetDelegate;
            hooks.ListDropTargetDelegate = (0, $6P4UV$ListDropTargetDelegate);
        }
        return hooks;
    }, [
        options
    ]);
    return {
        dragAndDropHooks: dragAndDropHooks
    };
}


export {$32ef394310635fd5$export$2cfc5be7a55829f6 as useDragAndDrop, $f9554a667e4f0374$export$62ed72bc21f6b8a6 as DropIndicator, $f9554a667e4f0374$export$f55761759794cf55 as DropIndicatorContext, $f9554a667e4f0374$export$d188a835a7bc5783 as DragAndDropContext};
//# sourceMappingURL=useDragAndDrop.mjs.map
