"""Action Items utility functions — status/priority/category styling.""" STATUS_CONFIG = { "pending": {"emoji": "🔴", "label": "대기", "color": "#ff6b6b", "bg": "#FEE2E2"}, "in_progress": {"emoji": "🟡", "label": "진행", "color": "#f59e0b", "bg": "#FEF3C7"}, "completed": {"emoji": "🟢", "label": "완료", "color": "#10b981", "bg": "#D1FAE5"}, "archived": {"emoji": "⚪", "label": "보관", "color": "#9ca3af", "bg": "#F3F4F6"}, } STATUS_OPTIONS = ["pending", "in_progress", "completed", "archived"] STATUS_LABELS = {k: f"{v['emoji']} {v['label']}" for k, v in STATUS_CONFIG.items()} CATEGORY_CONFIG = { "플랫폼최적화": {"color": "#4361ee", "icon": "🌐"}, "채널전략": {"color": "#3a0ca3", "icon": "📡"}, "SEO강화": {"color": "#7209b7", "icon": "🔎"}, "감성관리": {"color": "#f72585", "icon": "💬"}, "콘텐츠개선": {"color": "#4cc9f0", "icon": "📝"}, "부정감성대응": {"color": "#e63946", "icon": "🛡️"}, } # Legacy alias CATEGORY_COLORS = {k: v["color"] for k, v in CATEGORY_CONFIG.items()} def priority_level(priority: int) -> tuple[str, str, str]: """Return (label, color, bg) based on priority score.""" if priority >= 80: return "긴급", "#dc2626", "#FEE2E2" if priority >= 60: return "높음", "#f59e0b", "#FEF3C7" if priority >= 40: return "보통", "#3b82f6", "#DBEAFE" return "낮음", "#9ca3af", "#F3F4F6" def status_emoji(status: str) -> str: """Return emoji for status.""" return STATUS_CONFIG.get(status, {}).get("emoji", "❓") def status_label(status: str) -> str: """Return localized label for status.""" return STATUS_CONFIG.get(status, {}).get("label", status)