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

namespace MyTelegram.Schema.Help;

///<summary>
/// Represents a <a href="https://corefork.telegram.org/api/colors">color palette that can be used in profile pages »</a>.
/// See <a href="https://corefork.telegram.org/constructor/help.peerColorProfileSet" />
///</summary>
[TlObject(0x767d61eb)]
public sealed class TPeerColorProfileSet : IPeerColorSet
{
    public uint ConstructorId => 0x767d61eb;
    ///<summary>
    /// A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette.
    ///</summary>
    public TVector<int> PaletteColors { get; set; }

    ///<summary>
    /// A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page.
    ///</summary>
    public TVector<int> BgColors { get; set; }

    ///<summary>
    /// A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo.
    ///</summary>
    public TVector<int> StoryColors { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(PaletteColors);
        writer.Write(BgColors);
        writer.Write(StoryColors);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PaletteColors = buffer.Read<TVector<int>>();
        BgColors = buffer.Read<TVector<int>>();
        StoryColors = buffer.Read<TVector<int>>();
    }
}