use std::path::{Path, PathBuf};
pub type Error = Box<dyn std::error::Error>;
pub type Result<T> = std::result::Result<T, Error>;
pub trait PreviewApi {
fn set_design_mode(&self, enable: bool);
fn design_mode(&self) -> bool;
fn set_contents(&self, path: &Path, contents: &str);
fn load_preview(&self, component: PreviewComponent, behavior: PostLoadBehavior);
fn config_changed(&self, style: &str, include_paths: &[PathBuf]);
fn highlight(&self, path: Option<PathBuf>, offset: u32) -> Result<()>;
}
#[allow(unused)]
#[derive(Default, Clone)]
pub struct PreviewComponent {
pub path: PathBuf,
pub component: Option<String>,
pub include_paths: Vec<PathBuf>,
pub style: String,
}
#[allow(unused)]
pub enum PostLoadBehavior {
ShowAfterLoad,
DoNothing,
}