{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAeD,MAAM,iCAAW;IACf,UAAU;IACV,OAAO;IACP,SAAS;AACX;AAEO,SAAS;IACd,IAAI,kBAAkB,CAAA,GAAA,qDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,yCAAc;IAC7B,IAAI,cAAc;IAClB,IAAI,mBAAmB,CAAA,GAAA,wCAAa,EAAE,cAAc,gBAAgB,MAAM,CAAC,8BAAQ,CAAC,SAAS,IAAI;IAEjG,OAAO;QACL,WAAW;YACT,GAAG,gBAAgB;YACnB,yFAAyF;YACzF,0FAA0F;YAC1F,0FAA0F;YAC1F,yCAAyC;YACzC,4EAA4E;YAC5E,SAAS,KAAO;QAClB;IACF;AACF","sources":["packages/react-aria/src/dnd/useVirtualDrop.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '../button/useButton';\nimport {DOMAttributes} from 'react';\nimport * as DragManager from './DragManager';\n// @ts-ignore\nimport intlMessages from '../../intl/dnd/*.json';\nimport {useDescription} from '../utils/useDescription';\nimport {useDragModality} from './utils';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\ninterface VirtualDropResult {\n  dropProps: AriaButtonProps & DOMAttributes<HTMLDivElement>\n}\n\nconst MESSAGES = {\n  keyboard: 'dropDescriptionKeyboard',\n  touch: 'dropDescriptionTouch',\n  virtual: 'dropDescriptionVirtual'\n};\n\nexport function useVirtualDrop(): VirtualDropResult {\n  let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/dnd');\n  let modality = useDragModality();\n  let dragSession = DragManager.useDragSession();\n  let descriptionProps = useDescription(dragSession ? stringFormatter.format(MESSAGES[modality]) : '');\n\n  return {\n    dropProps: {\n      ...descriptionProps,\n      // Mobile Safari does not properly bubble click events on elements except links or inputs\n      // unless there is an onclick handler bound directly to the element itself. By adding this\n      // handler, React will take care of adding that for us, and we are able to handle document\n      // level click events in the DragManager.\n      // See https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n      onClick: () => {}\n    }\n  };\n}\n"],"names":[],"version":3,"file":"useVirtualDrop.cjs.map"}