use std::path::PathBuf;
pub type ClipResult<T> = Result<T, ClipError>;
#[derive(Debug, thiserror::Error)]
pub enum ClipError {
#[cfg(not(target_arch = "wasm32"))]
#[error("Database error: {0}")]
Database(#[from] sqlx::Error),
#[error("Clip not found: {0}")]
ClipNotFound(String),
#[error("Bin not found: {0}")]
BinNotFound(String),
#[error("Folder not found: {0}")]
FolderNotFound(String),
#[error("Collection not found: {0}")]
CollectionNotFound(String),
#[error("Marker not found: {0}")]
MarkerNotFound(String),
#[error("Note not found: {0}")]
NoteNotFound(String),
#[error("Take not found: {0}")]
TakeNotFound(String),
#[error("Invalid timecode: {0}")]
InvalidTimecode(String),
#[error("Invalid rating: {0}")]
InvalidRating(i32),
#[error("Invalid proxy quality: {0}")]
InvalidProxyQuality(String),
#[error("File not found: {0}")]
FileNotFound(PathBuf),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Serialization error: {0}")]
Serialization(String),
#[error("Invalid smart collection rule: {0}")]
InvalidSmartRule(String),
#[error("Export error: {0}")]
Export(String),
#[error("Import error: {0}")]
Import(String),
}