{"version":3,"file":"Logo.mjs","names":["Neo4JLogoBlackIcon","Neo4JLogoColorIcon","Neo4JLogoWhiteIcon","Neo4JIconBlackIcon","Neo4JIconColorIcon","Neo4JIconWhiteIcon"],"sources":["../../../src/logo/Logo.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 { type CommonProps } from '../_common/types';\nimport Neo4JIconBlackIcon from '../icons/generated/custom/Neo4JIconBlack';\nimport Neo4JIconColorIcon from '../icons/generated/custom/Neo4JIconColor';\nimport Neo4JIconWhiteIcon from '../icons/generated/custom/Neo4JIconWhite';\nimport Neo4JLogoBlackIcon from '../icons/generated/custom/Neo4JLogoBlack';\nimport Neo4JLogoColorIcon from '../icons/generated/custom/Neo4JLogoColor';\nimport Neo4JLogoWhiteIcon from '../icons/generated/custom/Neo4JLogoWhite';\nimport { useNeedleTheme } from '../theme';\n\ntype IconColor = 'black' | 'white' | 'color';\ntype IconType = 'full' | 'icon';\n\ntype LogoProps = {\n  color?: IconColor;\n  type?: IconType;\n};\n\nconst iconMap = {\n  full: {\n    black: Neo4JLogoBlackIcon,\n    color: Neo4JLogoColorIcon,\n    white: Neo4JLogoWhiteIcon,\n  },\n  icon: {\n    black: Neo4JIconBlackIcon,\n    color: Neo4JIconColorIcon,\n    white: Neo4JIconWhiteIcon,\n  },\n};\n\n/**\n * By default, Logo will be theme aware, unless `color` is explicitly provided.\n *\n * On light theme it will be colored and on dark theme it will be white.\n */\nexport const Logo = ({\n  color,\n  type = 'full',\n  className,\n  style,\n  htmlAttributes,\n  ref,\n}: CommonProps<'svg', LogoProps>) => {\n  const theme = useNeedleTheme();\n\n  // use themed logo if color is not explicitly provided\n  const iconColor: IconColor = color\n    ? color\n    : theme.theme === 'light'\n      ? 'color'\n      : 'white';\n\n  const Icon = iconMap[type][iconColor];\n\n  return (\n    <Icon ref={ref} className={className} style={style} {...htmlAttributes} />\n  );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,UAAU;CACd,MAAM;EACJ,OAAOA;EACP,OAAOC;EACP,OAAOC;CACT;CACA,MAAM;EACJ,OAAOC;EACP,OAAOC;EACP,OAAOC;CACT;AACF;;;;;;AAOA,MAAa,QAAQ,EACnB,OACA,OAAO,QACP,WACA,OACA,gBACA,UACmC;CACnC,MAAM,QAAQ,eAAe;CAG7B,MAAM,YAAuB,QACzB,QACA,MAAM,UAAU,UACd,UACA;CAEN,MAAM,OAAO,QAAQ,KAAK,CAAC;CAE3B,OACE,oBAAC,MAAA,eAAA;EAAU;EAAgB;EAAkB;CAAW,GAAA,cAAiB,CAAA;AAE7E"}