{"mappings":";;AAAA;;;;;;;;;;CAUC;AAYM,SAAS,0CACd,KAAiC,EACjC,KAA+B,EAC/B,GAAkC;IAElC,0EAA0E;IAC1E,IAAI,yBAAC,qBAAqB,EAAC,GAAG,CAAA,GAAA,yCAAa;IAC3C,IAAI,MAAM,YAAY,CAAC,IAAI,GAAG,KAAK,uBAAuB,YAAY,IAAI,OAAO,EAC/E,CAAA,GAAA,yCAAuB,EAAE;AAE7B","sources":["packages/react-aria/src/dnd/useDraggableCollection.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {globalDndState, setDraggingCollectionRef} from './utils';\nimport {RefObject} from '@react-types/shared';\n\nexport interface DraggableCollectionOptions {}\n\n/**\n * Handles drag interactions for a collection component, with support for traditional mouse and\n * touch based drag and drop, in addition to full parity for keyboard and screen reader users.\n */\nexport function useDraggableCollection(\n  props: DraggableCollectionOptions,\n  state: DraggableCollectionState,\n  ref: RefObject<HTMLElement | null>\n): void {\n  // Update global DnD state if this keys within this collection are dragged\n  let {draggingCollectionRef} = globalDndState;\n  if (state.draggingKeys.size > 0 && draggingCollectionRef?.current !== ref.current) {\n    setDraggingCollectionRef(ref);\n  }\n}\n"],"names":[],"version":3,"file":"useDraggableCollection.mjs.map"}