use anyhow::Result;
use egui::{RichText, Ui};
use crate::{AnnatomicApp, app::MainView};
pub(crate) fn show(ui: &mut Ui, app: &mut AnnatomicApp) -> Result<()> {
ui.vertical(|ui| {
ui.horizontal(|ui| {
if ui
.link(format!(
"{} Go back to corpus structure",
egui_phosphor::regular::ARROW_LEFT
))
.clicked()
{
app.change_view(MainView::CorpusStructure);
}
if let Some(editor) = app.current_editor.get() {
ui.label(RichText::new(editor.get_edited_node()).weak());
}
});
});
ui.separator();
if let Some(editor) = app.current_editor.get_mut() {
editor.show(ui);
}
Ok(())
}