//! Editor-owned authored asset documents and explicit save boundaries.
//!
//! Interactive UI mutates these documents and live runtime handles only. Source publication,
//! collaboration checks, watcher suppression, and derived processing happen exclusively here.

use std::collections::{HashMap, VecDeque};
use std::fs;
use std::path::{Path, PathBuf};
use std::thread::JoinHandle;
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};

use bevy::prelude::*;
use blacksite_surface::LiveMaterialDocument;
use serde::{Deserialize, Serialize};
use shared::{
    AssetId, AssetKind, AssetRegistryDocument, MaterialAsset, MaterialInstanceAsset,
    ModelImportSettings, ProjectContentDefaults, RuntimeContentCatalog, TextureImportSettings,
};

use crate::asset_db::{AssetRecord, AssetRegistry};
use crate::assets::EditorAssets;
use crate::project::collaboration::{
    publish_authored_file, FileRevision, FileSnapshot, FileWriteIntent,
};
use crate::project_io::ProjectWorkspace;
use crate::scene::recovery::{atomic_write, default_state_root};
use crate::scene_io::{SceneIo, SceneIoRequest};

mod processing_impact;
pub use processing_impact::DerivedProcessingImpact;
use processing_impact::{instance_impact, material_impact};

#[path = "asset_documents/document_store/live_updates.rs"]
mod live_updates;
#[path = "asset_documents/document_store/processing.rs"]
mod processing;
#[path = "asset_documents/document_store/publication.rs"]
mod publication;
#[path = "asset_documents/document_store/recovery.rs"]
mod recovery;
#[path = "asset_documents/document_store/service.rs"]
mod service;
#[path = "asset_documents/document_store/store.rs"]
mod store;

pub use live_updates::*;
use processing::*;
pub use publication::*;
pub use recovery::*;
pub use service::*;
pub use store::*;
