using CustomizePlus.Core.Data; using CustomizePlus.Game.Events; using CustomizePlus.Game.Services; using CustomizePlus.Profiles; using CustomizePlus.Profiles.Data; using CustomizePlus.Profiles.Enums; using CustomizePlus.Templates.Data; using CustomizePlus.Templates.Events; using FFXIVClientStructs.FFXIV.Client.Graphics.Scene; using OtterGui.Log; using System; using System.Collections.Generic; using System.Numerics; namespace CustomizePlus.Templates; public class TemplateEditorManager { private readonly TemplateChanged _event; private readonly Logger _logger; private readonly GameObjectService _gameObjectService; private readonly TemplateManager _templateManager; /// /// Reference to the original template which is currently being edited, should not be edited! /// private Template _currentlyEditedTemplateOriginal; /// /// Internal profile for the editor /// public Profile EditorProfile { get; private set; } /// /// Original ID of the template which is currently being edited /// public Guid CurrentlyEditedTemplateId { get; private set; } /// /// A copy of currently edited template, all changes must be done on this template /// public Template? CurrentlyEditedTemplate { get; private set; } public bool IsEditorActive { get; private set; } /// /// Is editor currently paused? Happens automatically when editor is not compatible with the current game state. /// Keeps editor state frozen and prevents any changes to it, also sets editor profile as disabled. /// public bool IsEditorPaused { get; private set; } /// /// Indicates if there are any changes in current editing session or not /// public bool HasChanges { get; private set; } public bool IsKeepOnlyEditorProfileActive { get; set; } //todo public TemplateEditorManager( TemplateChanged @event, Logger logger, TemplateManager templateManager, GameObjectService gameObjectService) { _event = @event; _logger = logger; _templateManager = templateManager; _gameObjectService = gameObjectService; EditorProfile = new Profile() { Templates = new List