// <auto-generated/>
// ReSharper disable All

namespace MyTelegram.Schema;

///<summary>
/// Represents an <a href="https://corefork.telegram.org/api/emoji-categories">emoji category</a>.
/// See <a href="https://corefork.telegram.org/constructor/emojiGroup" />
///</summary>
[TlObject(0x7a9abda9)]
public sealed class TEmojiGroup : IEmojiGroup
{
    public uint ConstructorId => 0x7a9abda9;
    ///<summary>
    /// Category name, i.e. "Animals", "Flags", "Faces" and so on...
    ///</summary>
    public string Title { get; set; }

    ///<summary>
    /// A single custom emoji used as preview for the category.
    ///</summary>
    public long IconEmojiId { get; set; }

    ///<summary>
    /// A list of UTF-8 emojis, matching the category.
    ///</summary>
    public TVector<string> Emoticons { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Title);
        writer.Write(IconEmojiId);
        writer.Write(Emoticons);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Title = buffer.ReadString();
        IconEmojiId = buffer.ReadInt64();
        Emoticons = buffer.Read<TVector<string>>();
    }
}