using Glamourer.Designs;
using Glamourer.Gui;
using OtterGui.Classes;
namespace Glamourer.Events;
///
/// Triggered when a Design is edited in any way.
///
/// - Parameter is the type of the change
/// - Parameter is the changed Design.
/// - Parameter is any additional data depending on the type of change.
///
///
public sealed class DesignChanged()
: EventWrapper(nameof(DesignChanged))
{
public enum Type
{
/// A new design was created. Data is a potential path to move it to [string?].
Created,
/// An existing design was deleted. Data is null.
Deleted,
/// Invoked on full reload. Design and Data are null.
ReloadedAll,
/// An existing design was renamed. Data is the prior name [string].
Renamed,
/// An existing design had its description changed. Data is the prior description [string].
ChangedDescription,
/// An existing design had its associated color changed. Data is the prior color [string].
ChangedColor,
/// An existing design had a new tag added. Data is the new tag and the index it was added at [(string, int)].
AddedTag,
/// An existing design had an existing tag removed. Data is the removed tag and the index it had before removal [(string, int)].
RemovedTag,
/// An existing design had an existing tag renamed. Data is the old name of the tag, the new name of the tag, and the index it had before being resorted [(string, string, int)].
ChangedTag,
/// An existing design had a new associated mod added. Data is the Mod and its Settings [(Mod, ModSettings)].
AddedMod,
/// An existing design had an existing associated mod removed. Data is the Mod and its Settings [(Mod, ModSettings)].
RemovedMod,
/// An existing design had a link to a different design added, removed or moved. Data is null.
ChangedLink,
/// An existing design had a customization changed. Data is the old value, the new value and the type [(CustomizeValue, CustomizeValue, CustomizeIndex)].
Customize,
/// An existing design had an equipment piece changed. Data is the old value, the new value and the slot [(EquipItem, EquipItem, EquipSlot)].
Equip,
/// An existing design had its weapons changed. Data is the old mainhand, the old offhand, the new mainhand and the new offhand [(EquipItem, EquipItem, EquipItem, EquipItem)].
Weapon,
/// An existing design had a stain changed. Data is the old stain id, the new stain id and the slot [(StainId, StainId, EquipSlot)].
Stain,
/// An existing design had a crest visibility changed. Data is the old crest visibility, the new crest visibility and the slot [(bool, bool, EquipSlot)].
Crest,
/// An existing design had a customize parameter changed. Data is the old value, the new value and the flag [(CustomizeParameterValue, CustomizeParameterValue, CustomizeParameterFlag)].
Parameter,
/// An existing design changed whether a specific customization is applied. Data is the type of customization [CustomizeIndex].
ApplyCustomize,
/// An existing design changed whether a specific equipment is applied. Data is the slot of the equipment [EquipSlot].
ApplyEquip,
/// An existing design changed whether a specific stain is applied. Data is the slot of the equipment [EquipSlot].
ApplyStain,
/// An existing design changed whether a specific crest visibility is applied. Data is the slot of the equipment [EquipSlot].
ApplyCrest,
/// An existing design changed whether a specific customize parameter is applied. Data is the flag for the parameter [CustomizeParameterFlag].
ApplyParameter,
/// An existing design changed its write protection status. Data is the new value [bool].
WriteProtection,
/// An existing design changed one of the meta flags. Data is the flag, whether it was about their applying and the new value [(MetaFlag, bool, bool)].
Other,
}
public enum Priority
{
///
DesignLinkManager = 1,
///
AutoDesignManager = 1,
///
DesignFileSystem = 0,
///
DesignFileSystemSelector = -1,
///
DesignCombo = -2,
}
}