//! Wire frame for the AnnotationsCapability.
//!
//! Canonical definition lives here (moved from `maat-sdk` in WX-2).
//! The capability crate re-exports [`AnnotationsFrame`] at crate root for
//! ergonomic imports (`maat_capabilities_annotations::AnnotationsFrame`).

#[cfg(feature = "wire")]
mod wire_impl {
    use maat_sdk::capability::{Annotation, AnnotationId, SceneId};
    use maat_sdk_derive::WireFrameHash as DeriveWireFrameHash;

    /// Wire frame for the annotations capability.
    #[derive(Clone, Debug, PartialEq, DeriveWireFrameHash, serde::Serialize, serde::Deserialize)]
    pub enum AnnotationsFrame {
        Created {
            scene:      SceneId,
            annotation: Annotation,
        },
        Updated {
            scene:      SceneId,
            annotation: Annotation,
        },
        Removed {
            scene: SceneId,
            id:    AnnotationId,
        },
        SceneCleared {
            scene: SceneId,
        },
    }
}

#[cfg(feature = "wire")]
pub use wire_impl::AnnotationsFrame;
