use anyhow::{Context as _, Result};
pub fn run(text: String) -> Result<()> {
iced::application(move || App { text: text.clone() }, App::update, App::view)
.title("LR2 OxyTabler")
.theme(App::theme)
.run()
.context("iced error")
}
struct App {
text: String,
}
impl App {
#[expect(clippy::unused_self)]
const fn update(&mut self, _msg: ()) {}
fn view(&self) -> iced::Element<'_, ()> {
iced::widget::text(self.text.clone()).into()
}
#[expect(clippy::unused_self)]
const fn theme(&self) -> iced::Theme {
iced::Theme::Dark
}
}