using Model.Feedback; namespace Services.Website; public class TooltipService : ITooltipService { private readonly List tooltips = new(); public void Subscribe(Action action) { OnChange += action; } public void Unsubscribe(Action action) { OnChange += action; } public void AddTooltip(TooltipModel tooltip) { tooltips.Insert(0, tooltip); NotifyDataChanged(); } public void RemoveTooltip(TooltipModel tooltip) { tooltips.Remove(tooltip); } public bool HasTooltips() { return tooltips.Count > 0; } public List GetTooltips() { return tooltips; } public void ClearAllTooltips() { tooltips.Clear(); NotifyDataChanged(); } private event Action OnChange = null!; private void NotifyDataChanged() { OnChange(); } }