{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYe,kDAA4B,KAA8B;IACvE,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,yCAAc;IAC7D,MAAM,UAAC,MAAM,sBAAE,kBAAkB,EAAC,GAAG;IAErC,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAyB;IACxC,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAkB,gBAAgB,CAAE,OAAO,WAAY;IAClF,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,gDAAgB;IAE5C,IAAI,eAAe,UAAW,YAAY,CAAC;IAE3C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,0DAAC;QAAI,MAAK;QAAM,eAAa,kBAAkB,CAAC,cAAc;qBAC5D,0DAAC;QACC,MAAK;QACL,iBAAc;QACd,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAS,GACT,6CACA;YACE,yDAAyD;QAC3D;OAEH,CAAC,oCACA,0DAAC;QAAK,GAAG,mBAAmB;QAAE,MAAK;QAAU,GAAG,kBAAkB;QAAE,KAAK;;AAKnF","sources":["packages/@adobe/react-spectrum/src/list/InsertionIndicator.tsx"],"sourcesContent":["import {classNames} from '../utils/classNames';\nimport {ItemDropTarget} from '@react-types/shared';\nimport listStyles from './styles.css';\nimport {ListViewContext} from './ListView';\nimport React, {JSX, useContext, useRef} from 'react';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\ninterface InsertionIndicatorProps {\n  target: ItemDropTarget,\n  isPresentationOnly?: boolean\n}\n\nexport default function InsertionIndicator(props: InsertionIndicatorProps): JSX.Element | null {\n  let {dropState, dragAndDropHooks} = useContext(ListViewContext)!;\n  const {target, isPresentationOnly} = props;\n\n  let ref = useRef<HTMLDivElement | null>(null);\n  let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(props, dropState!, ref);\n  let {visuallyHiddenProps} = useVisuallyHidden();\n\n  let isDropTarget = dropState!.isDropTarget(target);\n\n  if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n    return null;\n  }\n\n  return (\n    <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']}>\n      <div\n        role=\"gridcell\"\n        aria-selected=\"false\"\n        className={\n          classNames(\n            listStyles,\n            'react-spectrum-ListViewInsertionIndicator',\n            {\n              'react-spectrum-ListViewInsertionIndicator--dropTarget': isDropTarget\n            }\n          )}>\n        {!isPresentationOnly &&\n          <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={ref} />\n        }\n      </div>\n    </div>\n  );\n}\n"],"names":[],"version":3,"file":"InsertionIndicator.cjs.map"}