using Dalamud.Plugin;
using Glamourer.Api.Api;
using Glamourer.Api.Enums;
using Glamourer.Api.Helpers;
namespace Glamourer.Api.IpcSubscribers;
///
public sealed class GetDesignList(IDalamudPluginInterface pi)
: FuncSubscriber>(pi, Label)
{
/// The label.
public const string Label = $"Glamourer.{nameof(GetDesignList)}.V2";
///
public new Dictionary Invoke()
=> base.Invoke();
/// Create a provider.
public static FuncProvider> Provider(IDalamudPluginInterface pi, IGlamourerApiDesigns api)
=> new(pi, Label, api.GetDesignList);
}
///
public sealed class ApplyDesign(IDalamudPluginInterface pi) : FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Glamourer.{nameof(ApplyDesign)}";
///
public GlamourerApiEc Invoke(Guid designId, int objectIndex, uint key = 0, ApplyFlag flags = ApplyFlagEx.DesignDefault)
=> (GlamourerApiEc)Invoke(designId, objectIndex, key, (ulong)flags);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IGlamourerApiDesigns api)
=> new(pi, Label, (a, b, c, d) => (int)api.ApplyDesign(a, b, c, (ApplyFlag)d));
}
///
public sealed class ApplyDesignName(IDalamudPluginInterface pi) : FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Glamourer.{nameof(ApplyDesignName)}";
///
public GlamourerApiEc Invoke(Guid designId, string objectName, uint key = 0, ApplyFlag flags = ApplyFlagEx.DesignDefault)
=> (GlamourerApiEc)Invoke(designId, objectName, key, (ulong)flags);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IGlamourerApiDesigns api)
=> new(pi, Label, (a, b, c, d) => (int)api.ApplyDesignName(a, b, c, (ApplyFlag)d));
}