{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,SAAS,0CAAmB,KAA8B;IAC/D,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,yCAAc;IAClD,MAAM,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IAE3B,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;QACC,OAAO;YACL,UAAU;YACV,KAAK,OAAO,SAAS,KAAK,EAAE,QAAQ,YAAY,OAAO,SAAS,KAAK,EAAE,WAAW,WAAW,SAAS,KAAK,CAAC,GAAG,GAAI,CAAA,OAAO,YAAY,KAAK,UAAU,SAAS,KAAK,CAAC,MAAM,GAAG,CAAA,IAAK;YAClL,OAAO,SAAS,KAAK,EAAE;QACzB;QACA,MAAK;QACL,eAAa,kBAAkB,CAAC,cAAc;qBAC9C,0DAAC;QACC,MAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,2CACA;YACE,uDAAuD;QACzD;qBAEJ,0DAAC;QAAK,GAAG,mBAAmB;QAAE,MAAK;QAAU,GAAG,kBAAkB;QAAE,KAAK;;AAIjF","sources":["packages/@adobe/react-spectrum/src/table/InsertionIndicator.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {classNames} from '../utils/classNames';\nimport {FocusableElement, ItemDropTarget} from '@react-types/shared';\nimport React, {DOMAttributes, HTMLAttributes, ReactNode, useRef} from 'react';\nimport styles from './table.css';\nimport {useTableContext} from './TableViewBase';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\ninterface InsertionIndicatorProps {\n  target: ItemDropTarget,\n  rowProps: HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>\n}\n\nexport function InsertionIndicator(props: InsertionIndicatorProps): ReactNode | null {\n  let {dropState, dragAndDropHooks} = useTableContext();\n  const {target, rowProps} = 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\n      style={{\n        position: 'absolute',\n        top: typeof rowProps.style?.top === 'number' && typeof rowProps.style?.height === 'number' ? rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0) : 0,\n        width: rowProps.style?.width\n      }}\n      role=\"row\"\n      aria-hidden={dropIndicatorProps['aria-hidden']}>\n      <div\n        role=\"gridcell\"\n        className={\n          classNames(\n            styles,\n            'react-spectrum-Table-InsertionIndicator',\n            {\n              'react-spectrum-Table-InsertionIndicator--dropTarget': isDropTarget\n            }\n        )}>\n        <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={ref} />\n      </div>\n    </div>\n  );\n}\n"],"names":[],"version":3,"file":"InsertionIndicator.cjs.map"}