using UnityEngine;

namespace Streamingle.Editor
{
    /// <summary>
    /// Preview-only lineage stored as a hidden Timeline subasset. This lives in
    /// the Editor assembly and is removed when a durable Final Timeline is made.
    /// </summary>
    public sealed class AICameraPreviewGenerationProvenance : ScriptableObject
    {
        internal const string CurrentSchemaVersion =
            "ai-camera-preview-generation-provenance-v1";

        [SerializeField, HideInInspector]
        private string _schemaVersion = CurrentSchemaVersion;
        [SerializeField, HideInInspector]
        private string _cwAiRelativeGeneratedFolder = string.Empty;
        [SerializeField, HideInInspector]
        private string _absoluteGeneratedFolder = string.Empty;
        [SerializeField, HideInInspector]
        private string _metadataSha256 = string.Empty;

        internal string SchemaVersion => _schemaVersion;
        internal string CwAiRelativeGeneratedFolder =>
            _cwAiRelativeGeneratedFolder;
        internal string AbsoluteGeneratedFolder => _absoluteGeneratedFolder;
        internal string MetadataSha256 => _metadataSha256;

        internal void SetValues(
            string cwAiRelativeGeneratedFolder,
            string absoluteGeneratedFolder,
            string metadataSha256)
        {
            _schemaVersion = CurrentSchemaVersion;
            _cwAiRelativeGeneratedFolder =
                cwAiRelativeGeneratedFolder ?? string.Empty;
            _absoluteGeneratedFolder = absoluteGeneratedFolder ?? string.Empty;
            _metadataSha256 = metadataSha256 ?? string.Empty;
        }
    }
}
