package com.jishisongfu.duobibi.ui.arena

import androidx.annotation.DrawableRes
import androidx.compose.ui.graphics.Color
import com.jishisongfu.duobibi.R

/**
 * 比价擂台首屏的品类入口(参考 shaguabijia 品类页设计语言)。
 *
 * 每个品类锁定一个固定平台集合,点击后用该集合调 arena-quote
 * (后端 ArenaQuoteRequest 已支持 platforms 参数,不传则用默认 4 大电商)。
 *
 * 配色是这一屏专属的"分类编码",故意打破其它屏的 3 色约束。icon 全部自绘
 * 几何线条(rectangle / circle / path),不复刻任何平台或商品的真实 logo /
 * 图标设计 —— 走通用商超符号系统。
 */
enum class ArenaCategory(
    val title: String,
    val subtitle: String,
    val group: String,
    val platforms: List<String>,
    val placeholder: String,
    @DrawableRes val iconRes: Int,
    val tintBg: Color,
    val tintFg: Color,
) {
    Takeaway(
        title = "外卖比价",
        subtitle = "美团外卖、饿了么 · 同店同菜全对比",
        group = "餐饮外卖",
        platforms = listOf("美团外卖", "饿了么"),
        placeholder = "搜餐品名,如 红烧肥牛饭",
        iconRes = R.drawable.ic_cat_takeaway,
        tintBg = Color(0xFFFFEDD5),
        tintFg = Color(0xFFC2410C),
    ),
    Grocery(
        title = "同城买菜",
        subtitle = "美团、饿了么 同城配送一键比",
        group = "餐饮外卖",
        platforms = listOf("美团", "饿了么"),
        placeholder = "搜生鲜,如 五花肉 500g",
        iconRes = R.drawable.ic_cat_grocery,
        tintBg = Color(0xFFD1FAE5),
        tintFg = Color(0xFF047857),
    ),
    Ecommerce(
        title = "电商比价",
        subtitle = "淘宝、京东、拼多多、抖音 全网到手价",
        group = "网上购物",
        platforms = listOf("淘宝", "京东", "拼多多", "抖音"),
        placeholder = "输入商品名,如 iPhone 15 Pro 256G",
        iconRes = R.drawable.ic_cat_ecommerce,
        tintBg = Color(0xFFFEE2E2),
        tintFg = Color(0xFFB91C1C),
    ),
    Digital(
        title = "数码家电",
        subtitle = "手机 / 笔电 / 家电 · 自动跨平台拉表",
        group = "网上购物",
        platforms = listOf("淘宝", "京东", "拼多多", "抖音"),
        placeholder = "搜数码,如 MacBook Air 13",
        iconRes = R.drawable.ic_cat_digital,
        tintBg = Color(0xFFDBEAFE),
        tintFg = Color(0xFF1D4ED8),
    ),
    Fashion(
        title = "服饰美妆",
        subtitle = "同款同色 跨店铺到手价对比",
        group = "网上购物",
        platforms = listOf("淘宝", "京东", "拼多多", "抖音"),
        placeholder = "搜款式,如 雅诗兰黛精华液",
        iconRes = R.drawable.ic_cat_fashion,
        tintBg = Color(0xFFFCE7F3),
        tintFg = Color(0xFFBE185D),
    ),
    Daily(
        title = "日用百货",
        subtitle = "淘京拼抖 + 美团闪购 全场景比",
        group = "网上购物",
        platforms = listOf("淘宝", "京东", "拼多多", "抖音", "美团"),
        placeholder = "搜日用,如 抽纸 24 包",
        iconRes = R.drawable.ic_cat_daily,
        tintBg = Color(0xFFEDE9FE),
        tintFg = Color(0xFF6D28D9),
    );

    companion object {
        /** 用于按 group 分组渲染(餐饮外卖 / 网上购物)。 */
        val ORDERED_GROUPS: List<String> = listOf("餐饮外卖", "网上购物")
    }
}
