#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EStoreLinkType {
    None = 0,
    YouTube = 1,
    Facebook = 2,
    Twitter = 3,
    Twitch = 4,
    Discord = 5,
    QQ = 6,
    VK = 7,
    Bilibili = 8,
    Weibo = 9,
    Reddit = 10,
    Instagram = 11,
    Tumblr = 12,
    Tieba = 13,
    Tiktok = 14,
    Telegram = 15,
    LinkedIn = 16,
    WeChat = 17,
    QQLink = 18,
    Douyin = 19,
    Bluesky = 20,
    Mastodon = 21,
    Threads = 22,
    QQChannel = 23,
    RedNote = 24,
    MAX = 25,
}

impl EStoreLinkType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::YouTube as i32 => Some(Self::YouTube),
            x if x == Self::Facebook as i32 => Some(Self::Facebook),
            x if x == Self::Twitter as i32 => Some(Self::Twitter),
            x if x == Self::Twitch as i32 => Some(Self::Twitch),
            x if x == Self::Discord as i32 => Some(Self::Discord),
            x if x == Self::QQ as i32 => Some(Self::QQ),
            x if x == Self::VK as i32 => Some(Self::VK),
            x if x == Self::Bilibili as i32 => Some(Self::Bilibili),
            x if x == Self::Weibo as i32 => Some(Self::Weibo),
            x if x == Self::Reddit as i32 => Some(Self::Reddit),
            x if x == Self::Instagram as i32 => Some(Self::Instagram),
            x if x == Self::Tumblr as i32 => Some(Self::Tumblr),
            x if x == Self::Tieba as i32 => Some(Self::Tieba),
            x if x == Self::Tiktok as i32 => Some(Self::Tiktok),
            x if x == Self::Telegram as i32 => Some(Self::Telegram),
            x if x == Self::LinkedIn as i32 => Some(Self::LinkedIn),
            x if x == Self::WeChat as i32 => Some(Self::WeChat),
            x if x == Self::QQLink as i32 => Some(Self::QQLink),
            x if x == Self::Douyin as i32 => Some(Self::Douyin),
            x if x == Self::Bluesky as i32 => Some(Self::Bluesky),
            x if x == Self::Mastodon as i32 => Some(Self::Mastodon),
            x if x == Self::Threads as i32 => Some(Self::Threads),
            x if x == Self::QQChannel as i32 => Some(Self::QQChannel),
            x if x == Self::RedNote as i32 => Some(Self::RedNote),
            x if x == Self::MAX as i32 => Some(Self::MAX),
            _ => None,
        }
    }
}
