from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
from profiles import Profile

import locales

LANG_CODES = ['ru', 'en', 'es', 'ua', 'pl', 'in']

def language_keyboard(texts: dict):
    kb = InlineKeyboardMarkup(row_width=2)

    buttons = [
        InlineKeyboardButton(
            text = texts[f"btn_{code}"],
            callback_data = f"lang_{code}"
        )
        for code in LANG_CODES
    ]

    kb.add(*buttons)
    return kb
