import { motion } from "framer-motion" import { ArrowRight, CaretRight, Gear, Lightning, Pause, Play, Trash } from "@phosphor-icons/react" import type { AutomationRuleRecord } from "@shared/types" import { timeAgo } from "../../lib/formatters" import { ACCENT, LINE, triggerConfig, actionConfig, statusColors } from "./automation-config" export function RuleCard({ rule, onToggle, onDelete, onEdit }: { rule: AutomationRuleRecord; onToggle: () => void; onDelete: () => void; onEdit: () => void }) { const triggerInfo = triggerConfig[rule.trigger]; const actionInfo = actionConfig[rule.action] const TriggerIcon = triggerInfo?.icon ?? Lightning; const colors = statusColors[rule.status] return (
) }