local PLUGIN = PLUGIN

PLUGIN.thanksPages = PLUGIN.thanksPages or {
    {
        id = "founders",
        title = "Руководители",
        people = {
            {
                name = "Oleg Zakon",
                model = "models/player/gman_high.mdl",
                sequence = "pose_standing_01",
                description = "Основатель и идейный вдохновитель Front Team. Отвечает за общее развитие проекта, стратегию и ключевые решения. Следит за качеством контента, стабильностью сервера и взаимодействием с сообществом.",
                link = "https://steamcommunity.com/profiles/76561198204118180"
            },
            {
                name = "Бугор",
                model = "models/player/breen.mdl",
                sequence = "pose_standing_01",
                description = "Правая рука владельца. Курирует техническую часть, развитие игровых механик и поддержку проекта. Обеспечивает бесперебойную работу сервера и помогает в реализации идей сообщества.",
                link = "https://steamcommunity.com/profiles/76561199186141452"
            }
        }
    },
    {
        id = "developers",
        title = "Разработчики",
        people = {

            {
                name = "Биба",
                model = "models/player/police.mdl",
                sequence = "pose_ducking_01",
                description = "Настройщик игровых механик",
                link = "https://steamcommunity.com/profiles/76561199189433293"
            },
            {
                name = "Scripty",
                model = "models/player/skeleton.mdl",
                sequence = "pose_standing_04",
                description = "Разработчик",
                link = "https://steamcommunity.com/profiles/76561198164572709"
            },
            {
                name = "ItzTomber",
                model = "models/player/kleiner.mdl",
                sequence = "pose_standing_04",
                description = "Разработчик",
                link = "https://steamcommunity.com/profiles/76561198341626975"
            },
            {
                name = "Hari",
                model = "models/player/magnusson.mdl",
                sequence = "pose_standing_02",
                description = "Разработчик.",
                link = "https://steamcommunity.com/profiles/76561198201651767"
            },
            {
                name = "Refosel",
                model = "models/kemono_friends/ezo_red_fox/ezo_red_fox_player.mdl",
                sequence = "pose_standing_01",
                description = "Главный Разработчик",
                link = "https://steamcommunity.com/profiles/76561198393073512"
            },
            {
                name = "Прохор",
                model = "models/player/odessa.mdl",
                sequence = "pose_standing_02",
                description = "Маппер.",
                link = "no link"
            },
            {
                name = "Сварщик",
                model = "models/player/eli.mdl",
                sequence = "pose_standing_04",
                description = "Модделер.",
                link = "https://steamcommunity.com/profiles/76561198440513870"
            },
            {
                name = "Козырный",
                model = "models/player/police.mdl",
                sequence = "pose_ducking_01",
                description = "Figma дизайнер.",
                link = "https://steamcommunity.com/profiles/76561199077227396"
            }
        }
    },
    {
        id = "helix",
        title = "Helix",
        people = {
            {
                name = "NutScript",
                model = "models/player/police.mdl",
                sequence = "pose_ducking_01",
                description = "Спасибо за Helix.",
                link = "https://github.com/NutScript/NutScript"
            },
            {
                name = "Alex Grist",
                model = "models/player/police.mdl",
                sequence = "pose_ducking_01",
                description = "Спасибо за Helix.",
                link = "https://steamcommunity.com/profiles/76561197979205163"
            },
            {
                name = "Igor Radovanovic",
                model = "models/player/combine_soldier.mdl",
                sequence = "pose_standing_04",
                description = "Спасибо за Helix.",
                link = "https://steamcommunity.com/profiles/76561197990111113"
            },
            {
                name = "Jaydawg",
                model = "models/player/combine_soldier_prisonguard.mdl",
                sequence = "pose_standing_02",
                description = "Спасибо за Helix.",
                link = "https://steamcommunity.com/profiles/76561197970371430"
            },
            {
                name = "nebulous",
                model = "models/player/combine_super_soldier.mdl",
                sequence = "pose_standing_01",
                description = "Спасибо за Helix.",
                link = "https://github.com/NebulousCloud"
            },
            {
                name = "Black Tea",
                model = "models/player/combine_soldier_prisonguard.mdl",
                sequence = "pose_standing_02",
                description = "Спасибо за Helix.",
                link = "https://steamcommunity.com/profiles/76561197999893894"
            },
            {
                name = "Rain GBizzle",
                model = "models/player/combine_soldier.mdl",
                sequence = "pose_standing_04",
                description = "Спасибо за Helix.",
                link = "https://steamcommunity.com/profiles/76561198036111376"
            },
            {
                name = "Luna",
                model = "models/player/police.mdl",
                sequence = "pose_ducking_01",
                description = "Спасибо за Helix.",
                link = "https://steamcommunity.com/profiles/76561197988658543"
            },
            {
                name = "Contributors",
                model = "models/player/police.mdl",
                sequence = "pose_ducking_01",
                description = "Спасибо за Helix.",
                link = "https://github.com/NebulousCloud/helix/graphs/contributors"
            }
        }
    }
}

function PLUGIN:GetThanksPages()
    return self.thanksPages or {}
end

function PLUGIN:GetThanksPage(identifier)
    if not identifier then return end

    for _, page in ipairs(self:GetThanksPages()) do
        if page.id == identifier then
            return page
        end
    end
end

function PLUGIN:GetThanksPerson(pageID, personName)
    local page = self:GetThanksPage(pageID)
    if not page then return end

    for _, person in ipairs(page.people or {}) do
        if person.name == personName then
            return person
        end
    end
end
