// frontend/components/notify/SrcIcon.tsx — 알림 소스 아이콘 (mail/cal/chat/fin/app)
"use client";
import { Icon } from "@/components/Icon";
import type { IconName } from "@/components/icons/paths";
import type { NotifySource } from "@/lib/types";

const NT_SRC: Record<NotifySource, { d: IconName; tone: string }> = {
  mail: { d: "mail", tone: "var(--blue)" },
  cal: { d: "cal", tone: "var(--violet)" },
  chat: { d: "msg", tone: "var(--violet)" },
  fin: { d: "card", tone: "var(--green)" },
  app: { d: "grid", tone: "var(--ink-2)" },
};

export function SrcIcon({ src }: { src: NotifySource }) {
  const s = NT_SRC[src] || NT_SRC.app;
  return (
    <span className="nt-ic" style={{ color: s.tone }}>
      <Icon name={s.d} />
    </span>
  );
}
