---
// Brain icon by Sergey Patutin / The Noun Project — CC BY 3.0.
// Path data shared with apps/www/src/components/BrainMark.astro.
import {
  BRAIN_PATH_D,
  BRAIN_VIEWBOX,
  BRAIN_GROUP_TRANSFORM,
} from "../lib/brain-path.mjs";

interface Props {
  class?: string;
  size?: number;
  title?: string;
  strokeWidth?: number;
}

const {
  class: className = "",
  size = 44,
  title,
  strokeWidth = 1.6,
} = Astro.props;
---

<svg
  xmlns="http://www.w3.org/2000/svg"
  viewBox={BRAIN_VIEWBOX}
  width={size}
  height={size}
  class={className}
  fill="currentColor"
  role={title ? "img" : undefined}
  aria-hidden={title ? undefined : "true"}
>
  {title && <title>{title}</title>}
  <!-- Brain icon by Sergey Patutin / The Noun Project (CC BY 3.0) -->
  <g transform={BRAIN_GROUP_TRANSFORM}>
    <path
      d={BRAIN_PATH_D}
      stroke="currentColor"
      stroke-width={strokeWidth}
      stroke-linejoin="round"
      stroke-linecap="round"
    />
  </g>
</svg>
