const LEVELS = [
    {
        min: 0,
        max: 10,
        level: 1,
        title: "/images/result/title-level=1.png",
        description: "你完全沒概念，颱風來就佛系放空，水桶、乾糧通通沒準備，停電只能滑手機到沒電，真的超亂來！",
        image: "/images/result/level=1.png",
        gif: "/images/result/level=1.gif"
    },
    {
        min: 11,
        max: 20,
        level: 2,
        title: "/images/result/title-level=2.png",
        description: "心裡知道要準備，但沒有明確準備方向，危機意識又 0 分，老是拖拖拖拖到最後一秒，小心後悔莫及！",
        image: "/images/result/level=2.png",
        gif: "/images/result/level=2.gif"
    },
    {
        min: 21,
        max: 30,
        level: 3,
        title: "/images/result/title-level=3.png",
        description: "稍微有點防災意識，但不知道該從何做起，只能慌亂東問西問黑白來。建議你還是補點防災知識以備不時之需啦。",
        image: "/images/result/level=3.png",
        gif: "/images/result/level=3.gif"
    },
    {
        min: 31,
        max: 40,
        level: 4,
        title: "/images/result/title-level=4.png",
        description: "看起來胸有成足，以為買很多泡麵就萬事ok，關鍵細節全忘了。嘿！除了泡麵之外，也要記得準備其他東西啦！",
        image: "/images/result/level=4.png",
        gif: "/images/result/level=4.gif"
    },
    {
        min: 41,
        max: 50,
        level: 5,
        title: "/images/result/title-level=5.png",
        description: "簡單準備了一些東西，但不夠全面，颱風來只能勉強撐過去。幸運的話能全身而退，但如果沒那麼幸運的話⋯⋯",
        image: "/images/result/level=5.png",
        gif: "/images/result/level=5.gif"
    },
    {
        min: 51,
        max: 60,
        level: 6,
        title: "/images/result/title-level=6.png",
        description: "已經有基礎防災準備，颱風來物資充足，計劃得當，面對災情可以不慌不忙，底氣還不錯！",
        image: "/images/result/level=6.png",
        gif: "/images/result/level=6.gif"
    },
    {
        min: 61,
        max: 70,
        level: 7,
        title: "/images/result/title-level=7.png",
        description: "進階防災選手，物資分類、避災計劃都很實用，朋友來請教你防颱秘訣，還會教出一堆徒弟！",
        image: "/images/result/level=7.png",
        gif: "/images/result/level=7.gif"
    },
    {
        min: 71,
        max: 80,
        level: 8,
        title: "/images/result/title-level=8.png",
        description: "你的防颱技巧專業到像SOP，每一步都超穩定，朋友直接抄你的備災清單，超有一套！",
        image: "/images/result/level=8.png",
        gif: "/images/result/level=8.gif"
    },
    {
        min: 81,
        max: 90,
        level: 9,
        title: "/images/result/title-level=9.png",
        description: "防災準備不只到位，還能精準預測危機，颱風來了不只自己ok，還帶領全場一起穩住陣腳！",
        image: "/images/result/level=9.png",
        gif: "/images/result/level=9.gif"
    },
    {
        min: 91,
        max: 100,
        level: 10,
        title: "/images/result/title-level=10.png",
        description: "你就是防颱界的MVP，颱風來也不慌，還能幫整個社區穩定軍心，簡直是神級防災領袖！",
        image: "/images/result/level=10.png",
        gif: "/images/result/level=10.gif"
    },
]

export function getLevel(score) {
    return LEVELS.find(ranking => score >= ranking.min && score <= ranking.max)
}