File size: 1,742 Bytes
ef78361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""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)