Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

544 B
Raw Blame
import { AlertTriangleIcon, BellIcon, HashIcon, LinkIcon, MailIcon } from "lucide-react";

import { AlertChannelType } from "@app/hooks/api/alerts";

export type LucideIcon = typeof MailIcon;

const CHANNEL_ICONS: Record<AlertChannelType, LucideIcon> = {
  [AlertChannelType.Email]: MailIcon,
  [AlertChannelType.Slack]: HashIcon,
  [AlertChannelType.Webhook]: LinkIcon,
  [AlertChannelType.PagerDuty]: AlertTriangleIcon
};

export const getChannelIcon = (channelType: AlertChannelType): LucideIcon =>
  CHANNEL_ICONS[channelType] ?? BellIcon;