/**
 * Map project icon ids to Lucide icons for the sidebar.
 * Only Lucide "Animals" category icons are allowed for projects.
 */

import {
  Bird,
  Bug,
  Cat,
  Dog,
  Egg,
  Fish,
  Rabbit,
  Rat,
  Shrimp,
  Snail,
  Squirrel,
  Turtle,
  type LucideIcon,
} from 'lucide-react'
import type { ProjectIconId } from './types'

export const PROJECT_ICON_MAP: Record<ProjectIconId, LucideIcon> = {
  bird: Bird,
  bug: Bug,
  cat: Cat,
  dog: Dog,
  fish: Fish,
  rat: Rat,
  rabbit: Rabbit,
  squirrel: Squirrel,
  turtle: Turtle,
  snail: Snail,
  shrimp: Shrimp,
  egg: Egg
}

export function getProjectIcon(iconId: string): LucideIcon {
  return PROJECT_ICON_MAP[iconId as ProjectIconId] ?? Cat
}
