using System;
using PkmnLibSharp.Utilities;

namespace PkmnLibSharp.Library
{
    public class LibrarySettings : PointerWrapper
    {
        public byte MaximalLevel => Creaturelib.Generated.LibrarySettings.GetMaximalLevel(Ptr);
        public byte MaximalMoves => Creaturelib.Generated.LibrarySettings.GetMaximalAttacks(Ptr);
        public ushort ShinyRate => Pkmnlib.Generated.LibrarySettings.GetShinyRate(Ptr);
        
        internal LibrarySettings(IntPtr ptr) : base(ptr)
        {
        }

        public LibrarySettings(byte maximalLevel, byte maximalMoves, ushort shinyRate) : base(
            Pkmnlib.Generated.LibrarySettings.Construct(maximalLevel, maximalMoves, shinyRate))
        {
        }

        protected override void DeletePtr()
        {
            Pkmnlib.Generated.LibrarySettings.Destruct(Ptr);
        }
    }
}