using System.Collections.Generic;
using Intrepid.Utilities;
using UnityEngine;

namespace Intrepid.Gameplay.Codex.Perception
{
    /// <summary>
    /// Marker for world objects that can be processed by the CODEX Reading Field.
    /// Keep this data-oriented. Gameplay interaction should live elsewhere.
    /// </summary>
    public class CodexReadable : MonoBehaviour
    {
        [GroupConfigurations, SerializeField] private string semanticId;
        [GroupConfigurations, SerializeField] private List<CodexManifestEntry> manifest = new();
        [GroupDebug, SerializeField] private CodexReadingState readingState = CodexReadingState.Unseen;

        public string SemanticId => semanticId;
        public IReadOnlyList<CodexManifestEntry> Manifest => manifest;
        public CodexReadingState ReadingState => readingState;

        public void SetReadingState(CodexReadingState state)
        {
            readingState = state;
        }
    }
}
