using UnityEngine;
namespace Ashwild.Inventory
{
///
/// The view payload for the hover description panel: exactly what the panel renders (icon,
/// name, description, and an optional duration/uses bar), nothing more. The inventory manager
/// builds one of these from a hovered slot and pushes it into the view, so the panel never
/// touches ItemData or the inventory model — it just draws what it is handed.
///
public readonly struct ItemDescriptionView
{
public readonly Sprite Icon;
public readonly string Name;
public readonly string Description;
///
/// Whether the hovered item tracks uses/durability and should show its duration bar.
///
public readonly bool HasDuration;
///
/// Remaining uses as a 0..1 fill for the bar's Filled image.
///
public readonly float DurationFill;
///
/// The remaining/max label drawn over the bar, e.g. "3 / 5".
///
public readonly string DurationText;
public ItemDescriptionView(Sprite icon, string name, string description,
bool hasDuration, float durationFill, string durationText)
{
Icon = icon;
Name = name;
Description = description;
HasDuration = hasDuration;
DurationFill = durationFill;
DurationText = durationText;
}
}
}