using UnityEngine;

namespace LiveOpsExamples
{
  /// <summary>
  /// Baked sprite references for the Cozy Collector demo. Mirrors the Phaser
  /// texture keys; <see cref="ForSlug"/> falls back to the star sprite for
  /// unknown slugs, same as the Phaser backpack icon mapping.
  /// </summary>
  [CreateAssetMenu(menuName = "LiveOps Examples/Cozy Collector Sprite Library")]
  public class CozyCollectorSpriteLibrary : ScriptableObject
  {
    [SerializeField] private Sprite background;
    [SerializeField] private Sprite player;
    [SerializeField] private Sprite moonberry;
    [SerializeField] private Sprite acorn;
    [SerializeField] private Sprite star;
    [SerializeField] private Sprite snack;

    public Sprite Background => background;
    public Sprite Player => player;
    public Sprite Moonberry => moonberry;
    public Sprite Acorn => acorn;
    public Sprite Star => star;
    public Sprite Snack => snack;

    public Sprite ForSlug(string slug)
    {
      switch (slug)
      {
        case "background":
        case "camp-bg": return background;
        case "player": return player;
        case "moonberry": return moonberry;
        case "acorn": return acorn;
        case "snack": return snack;
        case "star":
        default: return star;
      }
    }
  }
}
