use std::{io, path::PathBuf}; use dirs::font_dir; use iced::{ advanced::graphics::text::cosmic_text::fontdb, font::{Family, Stretch, Style, Weight}, theme, widget::row, widget::{ button, column, combo_box, container, horizontal_space, scrollable, text, text_editor, text_input, }, Element, Font, Length, Task, }; use iced_video_player::Video; use tracing::{debug, error}; use crate::{ core::{service_items::ServiceTrait, songs::Song}, ui::slide_editor::{self, SlideEditor}, Background, BackgroundKind, }; use super::presenter::slide_view; #[derive(Debug)] pub struct SongEditor { pub song: Option, title: String, font_db: fontdb::Database, fonts: Vec<(fontdb::ID, String)>, fonts_combo: combo_box::State, font_sizes: combo_box::State, font: String, author: String, audio: PathBuf, font_size: usize, verse_order: String, pub lyrics: text_editor::Content, editing: bool, background: Option, video: Option