// Copyright (c) Strange Loop Games. All rights reserved.
// See LICENSE file in the project root for full license information.

namespace Eco.Mods.TechTree
{
    using Eco.Core.Utils;
    using Eco.Gameplay.Items;
    using Eco.Gameplay.Systems.Tooltip;
    using Eco.Gameplay.Systems.NewTooltip;
    using Eco.Gameplay.Systems.NewTooltip.TooltipLibraryFiles;
    using Eco.Shared.Items;
    using Eco.Shared.Utils;
    using Eco.Shared.Localization;
    using Eco.Core.PropertyHandling;

    //CameraItem can't be refrenced in Eco.Gameplay so it's tooltip parts can't be added in same place as other Tooltip Libraries 
    [TooltipLibrary]
    public static class CameraItemTooltipLibrary
    {
        public static void Initialize() { }
        
        [TooltipAffectedBy(typeof(CameraItem), nameof(CameraItem.Durability))]
        [Tooltip(11), NewTooltip(CacheAs.Instance, 11)]
        public static LocString DurabilityTooltip(this CameraItem camera) => Localizer.Do($"Film remaining: {Text.Info(Text.Int(camera.GetDurability()))}");
    }
}
