import { cn } from "~/lib/utils"; import { Bell, CheckCircle, Edit, Trash2, Plus } from "lucide-react"; import { Button } from "@/routes/ui/button"; export interface AlertConfigData { /** Token symbol */ tokenSymbol: string; /** Alert condition description */ condition: string; /** Current price */ currentPrice?: string; /** Trigger price */ triggerPrice?: string; /** Notification channels */ channels: { browser: boolean; inApp: boolean; email: boolean; }; } export interface AlertWidgetProps { /** Alert configuration data */ config: AlertConfigData; /** Whether this is a new alert or existing */ isNew?: boolean; /** Callback when edit is clicked */ onEdit?: () => void; /** Callback when delete is clicked */ onDelete?: () => void; /** Callback when add another is clicked */ onAddAnother?: () => void; /** Callback when view all alerts is clicked */ onViewAll?: () => void; /** Additional class names */ className?: string; } /** * AlertWidget - Embedded alert configuration widget for chat * * Shows alert configuration inline in chat after user sets an alert * via natural language command. */ export function AlertWidget({ config, isNew = true, onEdit, onDelete, onAddAnother, onViewAll, className, }: AlertWidgetProps) { return (
Notify via: