import { AlertTriangle, AtSign, Check, Flag, ListChecks, MessageCircleMore, PenLine, UserCheck, UserPlus, X, } from "lucide-react";
import { ParheliaAgentIcon } from "../ui/Icons";
import { notificationEventTypes } from "../services/notificationService";
const itemWatchEventOptions = [
    {
        eventType: notificationEventTypes.itemChanged,
        label: "Modifications",
        icon: PenLine,
    },
    {
        eventType: notificationEventTypes.feedback,
        label: "Comments & Suggestions",
        icon: MessageCircleMore,
    },
];
const projectWatchEventOptions = [
    {
        eventType: notificationEventTypes.projectAttentionRequired,
        label: "Attention required",
        icon: AlertTriangle,
    },
    {
        eventType: notificationEventTypes.projectTaskCompleted,
        label: "Task completed",
        icon: Check,
    },
    {
        eventType: notificationEventTypes.projectFinished,
        label: "Project finished",
        icon: Flag,
    },
];
const reviewWatchEventOptions = [
    {
        eventType: notificationEventTypes.reviewInvitation,
        label: "Review invitation",
        icon: UserPlus,
    },
    {
        eventType: notificationEventTypes.reviewCompleted,
        label: "Review completed",
        icon: UserCheck,
    },
    {
        eventType: notificationEventTypes.reviewRejected,
        label: "Review rejected",
        icon: X,
    },
];
const agentRunWatchEventOptions = [
    {
        eventType: notificationEventTypes.agentNotification,
        label: "Agent notification",
        icon: ParheliaAgentIcon,
    },
];
// Additional event types that may appear on subscriptions but are not part of
// the per-target-type default option lists (e.g. project task assignments).
// Provided so the settings panel can label any event type emitted by the
// backend, even when it's not selectable from the WatchButton dropdown.
const extraEventLabels = {
    [notificationEventTypes.mention]: { label: "Mention", icon: AtSign },
    [notificationEventTypes.taskAssigned]: {
        label: "Task assigned",
        icon: ListChecks,
    },
    [notificationEventTypes.taskStatusChanged]: {
        label: "Task status changed",
        icon: ListChecks,
    },
};
export function getWatchEventOptions(targetType) {
    switch (targetType) {
        case "item":
            return itemWatchEventOptions;
        case "project":
            return projectWatchEventOptions;
        case "review":
            return reviewWatchEventOptions;
        case "agent-run":
            return agentRunWatchEventOptions;
        default:
            return [];
    }
}
const allOptions = [
    ...itemWatchEventOptions,
    ...projectWatchEventOptions,
    ...reviewWatchEventOptions,
    ...agentRunWatchEventOptions,
];
const optionByEventType = new Map(allOptions.map((option) => [option.eventType, option]));
export function getEventTypeLabel(eventType) {
    const option = optionByEventType.get(eventType);
    if (option)
        return option.label;
    const extra = extraEventLabels[eventType];
    if (extra)
        return extra.label;
    return eventType;
}
export function getEventTypeIcon(eventType) {
    const option = optionByEventType.get(eventType);
    if (option)
        return option.icon;
    const extra = extraEventLabels[eventType];
    if (extra)
        return extra.icon;
    return undefined;
}
// Re-export for legacy importers in WatchButton.tsx.
export { itemWatchEventOptions, projectWatchEventOptions };
//# sourceMappingURL=watchEventOptions.js.map