{"version":3,"file":"MoreFiles.mjs","names":[],"sources":["../../../../src/ai/more-files/MoreFiles.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 classNames from 'classnames';\n\nimport type { CommonProps } from '../../_common/types';\n\ntype MoreFilesProps = {\n  /** The number of files to show */\n  count: number;\n  /** Callback function triggered when the more files button is clicked */\n  onClick?: () => void;\n  /** Whether the more files button is active. Should be true when it opens the menu of files. */\n  isActive?: boolean;\n};\n\n/**\n * The component is a button that is meant to open a menu of files when clicked.\n * It should be used in a chat when you have more files attached to the message than should be shown at once.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst MoreFilesComponent = ({\n  count,\n  onClick,\n  className,\n  style,\n  htmlAttributes,\n  ref,\n  isActive,\n  ...restProps\n}: CommonProps<'button', MoreFilesProps>) => {\n  const classes = classNames('ndl-ai-more-files', className, {\n    'ndl-active': isActive,\n  });\n\n  return (\n    <button\n      ref={ref}\n      type=\"button\"\n      onClick={onClick}\n      className={classes}\n      style={style}\n      aria-label={`${count} more files`}\n      aria-expanded={isActive}\n      {...restProps}\n      {...htmlAttributes}\n    >\n      +{count}\n    </button>\n  );\n};\n\nexport { MoreFilesComponent as MoreFiles };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;CAyCE;CACA;CACA;CACA;CACA;CACA;CACA;;;;;;;;AAPF,MAAM,sBAAsB,SASiB;CATjB,IAAA,EAC1B,OACA,SACA,WACA,OACA,gBACA,KACA,aAAA,MACG,YAAA,yBAAA,MAAA,SAAA;CAEH,MAAM,UAAU,WAAW,qBAAqB,WAAW,EACzD,cAAc,SAChB,CAAC;CAED,OACE,qBAAC,UAAA,eAAA,eAAA,eAAA;EACM;EACL,MAAK;EACI;EACT,WAAW;EACJ;EACP,cAAY,GAAG,MAAM;EACrB,iBAAe;CACX,GAAA,SAAA,GACA,cAAA,GAAA,CAAA,GAAA,EAAA,UATN,CAUC,KACG,KACI,EAAA,CAAA,CAAA;AAEZ"}