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

namespace MyTelegram.Schema;

///<summary>
/// Represents an attachment menu icon color for <a href="https://corefork.telegram.org/api/bots/attach">bot mini apps »</a>
/// See <a href="https://corefork.telegram.org/constructor/attachMenuBotIconColor" />
///</summary>
[TlObject(0x4576f3f0)]
public sealed class TAttachMenuBotIconColor : IAttachMenuBotIconColor
{
    public uint ConstructorId => 0x4576f3f0;
    ///<summary>
    /// One of the following values: <br><code>light_icon</code> - Color of the attachment menu icon (light mode) <br><code>light_text</code> - Color of the attachment menu label, once selected (light mode) <br><code>dark_icon</code> - Color of the attachment menu icon (dark mode) <br><code>dark_text</code> - Color of the attachment menu label, once selected (dark mode)
    ///</summary>
    public string Name { get; set; }

    ///<summary>
    /// Color in RGB24 format
    ///</summary>
    public int Color { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Name);
        writer.Write(Color);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Name = buffer.ReadString();
        Color = buffer.ReadInt32();
    }
}