namespace TD.Levels.Editor
{
    /// <summary>
    /// Editor-only transient state for the level bake workflow. Lives only in editor memory —
    /// not serialized to any asset, not shipped in builds.
    /// </summary>
    /// <remarks>
    /// The bake's failure state is intentionally not persisted to <see cref="LevelData"/> —
    /// failed bakes don't modify the asset on disk, so the previous successful bake (if any)
    /// remains intact. This static flag exists so the custom inspector can show a "FAILED"
    /// status next to the last bake info, and so the play-mode dirty-detection hook (next
    /// session) knows whether the in-memory state has uncommitted failures.
    ///
    /// Resets to false on success. Resets to false when Unity reloads (this is editor-only
    /// memory, not a serialized field), which is acceptable — the user will simply see the
    /// last successful bake's status until they bake again.
    /// </remarks>
    public static class LevelAuthoringEditorState
    {
        /// <summary>
        /// True if the most recent bake attempt failed (hard error in any phase). Cleared on
        /// successful bake or on Unity reload.
        /// </summary>
        public static bool HasUncommittedFailure;
    }
}
