{"version":3,"file":"ToolCall.mjs","names":[],"sources":["../../../../src/ai/tool-call/ToolCall.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 { Code, Typography } from '@neo4j-ndl/react';\nimport classNames from 'classnames';\n\nimport { type CommonProps } from '../../_common/types';\nimport { CheckIconOutline } from '../../icons/generated/heroIcons/CheckIconOutline';\n\ntype ToolCallProps = {\n  /** The content of the suggestion */\n  children?: React.ReactNode;\n  /** Whether the AI is done with using the tool */\n  isDone?: boolean;\n};\n\n/**\n * The component is used to display that an LLM is using a tool.\n * Per default, the component will display the text \"Using\".\n * If the `isDone` prop is true, the component will display the check icon and the text \"Ran\".\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst ToolCall = ({\n  children,\n  isDone = false,\n  ref,\n  className,\n  style,\n  htmlAttributes,\n  ...restProps\n}: CommonProps<'span', ToolCallProps>) => {\n  const classes = classNames('ndl-ai-tool', className);\n\n  return (\n    <Typography\n      variant=\"body-medium\"\n      ref={ref}\n      className={classes}\n      style={style}\n      htmlAttributes={htmlAttributes}\n      {...restProps}\n    >\n      <span className=\"ndl-ai-tool-status\">\n        {isDone ? (\n          <>\n            <CheckIconOutline className=\"ndl-ai-tool-icon\" />\n            Ran\n          </>\n        ) : (\n          'Using'\n        )}\n      </span>\n      <Code isRunnable={false}>{children}</Code>\n    </Typography>\n  );\n};\n\nexport { ToolCall };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CE;CACA;CACA;CACA;CACA;CACA;;;;;;;;;AANF,MAAM,YAAY,SAQwB;CARxB,IAAA,EAChB,UACA,SAAS,OACT,KACA,WACA,OACA,mBAAA,MACG,YAAA,yBAAA,MAAA,SAAA;CAEH,MAAM,UAAU,WAAW,eAAe,SAAS;CAEnD,OACE,qBAAC,YAAA,eAAA,eAAA;EACC,SAAQ;EACH;EACL,WAAW;EACJ;EACS;CACZ,GAAA,SAAA,GAAA,CAAA,GAAA,EAAA,UANN,CAQE,oBAAC,QAAD;EAAM,WAAU;EACb,UAAA,SACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,kBAAD,EAAkB,WAAU,mBAAoB,CAAA,GAAC,KAEjD,EAAA,CAAA,IAEF;CAEE,CAAA,GACN,oBAAC,MAAD;EAAM,YAAY;EAAQ;CAAe,CAAA,CAC/B,EAAA,CAAA,CAAA;AAEhB"}