{"version":3,"file":"Presence.mjs","names":["Neo4JAiColorLightIcon","Neo4JAiColorDarkIcon"],"sources":["../../../../src/ai/presence/Presence.tsx"],"sourcesContent":["/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useNeedleTheme } from '@neo4j-ndl/react';\nimport classNames from 'classnames';\n\nimport type { CommonProps } from '../../_common/types';\nimport {\n  Neo4JAiColorDark as Neo4JAiColorDarkIcon,\n  Neo4JAiColorLight as Neo4JAiColorLightIcon,\n} from '../../icons/manual/Neo4JAiColor';\n\ntype PresenceProps = {\n  /** Whether the AI is thinking. Animates the underlying SVG */\n  isThinking?: boolean;\n};\n\nconst Presence = ({\n  className,\n  isThinking = false,\n  style,\n  htmlAttributes,\n  ref,\n  ...restProps\n}: CommonProps<'svg', PresenceProps>) => {\n  const classes = classNames('ndl-ai-presence', className, {\n    'ndl-thinking': isThinking === true,\n  });\n  const { theme } = useNeedleTheme();\n\n  const Component =\n    theme === 'light' ? Neo4JAiColorLightIcon : Neo4JAiColorDarkIcon;\n\n  return (\n    <Component\n      ref={ref}\n      className={classes}\n      style={style}\n      htmlAttributes={htmlAttributes}\n      {...(isThinking === true && {\n        'aria-hidden': 'false',\n        'aria-label': 'Thinking',\n        'aria-live': 'polite',\n        role: 'status',\n      })}\n      {...restProps}\n    />\n  );\n};\n\nPresence.displayName = 'Presence';\n\nexport { Presence };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCE;CACA;CACA;CACA;CACA;;AALF,MAAM,YAAY,SAOuB;CAPvB,IAAA,EAChB,WACA,aAAa,OACb,OACA,gBACA,QAAA,MACG,YAAA,yBAAA,MAAA,SAAA;CAEH,MAAM,UAAU,WAAW,mBAAmB,WAAW,EACvD,gBAAgB,eAAe,KACjC,CAAC;CACD,MAAM,EAAE,UAAU,eAAe;CAKjC,OACE,oBAHA,UAAU,UAAUA,oBAAwBC,kBAAAA,eAAAA,eAAAA;EAIrC;EACL,WAAW;EACJ;EACS;CACX,GAAA,eAAe,QAAQ;EAC1B,eAAe;EACf,cAAc;EACd,aAAa;EACb,MAAM;CACR,CAAA,GACI,SACL,CAAA;AAEL;AAEA,SAAS,cAAc"}