use std::collections::BTreeSet;
use egui::Ui;
use crate::app::{actions::GraphAction, project::EditorStateUpdates};
pub(crate) mod corpus_structure;
pub(crate) mod edit;
pub(crate) mod export;
pub(crate) mod import;
pub(crate) mod start;
#[cfg(test)]
mod tests;
pub(crate) trait Editor: Send {
fn show(&mut self, ui: &mut Ui);
fn has_pending_updates(&self) -> bool;
fn take_pending_updates(&mut self) -> Vec<GraphAction>;
fn editor_state_updates(&self, action: &GraphAction) -> anyhow::Result<EditorStateUpdates>;
fn get_edited_node(&self) -> &str;
fn get_selected_nodes(&self) -> BTreeSet<String>;
fn consume_shortcuts(&mut self, _ctx: &egui::Context) {}
fn add_edit_menu_entries(&mut self, _ui: &mut egui::Ui) {}
fn any_mut(&mut self) -> &mut dyn std::any::Any;
}