"""
Centralized mapping for AI Stylist tags to Database constraints.
This file maintains the exact mapping between LLM generated prefix tags (e.g., 'occ:di_lam') 
and their corresponding SQLite/StarRocks database queries (either BITMAP columns or LIKE strings).
"""

TAG_TO_BITMAP_COL: dict[str, tuple[str, str]] = {
    # Style
    "style:thanh_lich":  ("style", "Feminine"),
    "style:nang_dong":   ("style", "Dynamic"),
    "style:basic":       ("style", "Basic"),
    "style:ca_tinh":     ("style", "Street"),
    "style:de_thuong":   ("style", "Cute"),
    "style:tre_trung":   ("style", "Trend"),
    "style:toi_gian":    ("style", "Essential"),
    "style:smart_casual":("style", "Smart Casual"),
    
    # Fit
    "fit:oversize":  ("fitting", "Oversize"),
    "fit:slim":      ("fitting", "Slim"),
    "fit:regular":   ("fitting", "Regular"),
    "fit:wide_leg":  ("fitting", "Relax"),
    "fit:cropped":   ("fitting", "Boxy"),
    "fit:relaxed":   ("fitting", "Relax"),
    
    # Weather / Season
    "wthr:mua_he":   ("season_sale", "Summer"),
    "wthr:mua_dong": ("season_sale", "Winter"),
    "wthr:giao_mua": ("season_sale", "Basic"),
    
    # Occasion mapped to Bitmap (e.g., season_sale or style)
    "occ:di_bien":   ("season_sale", "Summer"),
    "occ:du_lich":   ("season_sale", "Summer"),
    "occ:the_thao":  ("style", "Athleisure"),
}

TAG_TEXT_MAPPING: dict[str, str] = {
    # Occasion
    "occ:di_lam": "công sở",
    "occ:di_choi": "dạo phố",
    "occ:di_tiec": "tiệc",
    "occ:di_hoc": "đi học",
    "occ:mac_nha": "mặc ngủ",
    "occ:da_ngoai": "dã ngoại",
    "occ:di_ngu": "mặc ngủ",
    "occ:hang_ngay": "hàng ngày",
    
    # Weather
    "wthr:troi_mua": "trời mưa",
    "wthr:troi_nang": "trời nắng",
    
    # Function
    "func:thoang_mat": "thoáng mát",
    "func:giu_am": "giữ ấm",
    "func:tham_hut": "thấm hút",
    "func:nhanh_kho": "nhanh khô",
    "func:chong_uv": "chống uv",
    "func:can_gio": "cản gió",
}
