use std::{io, path::PathBuf, sync::Arc}; use cosmic::{ Element, Task, dialog::file_chooser::{FileFilter, open::Dialog}, iced::{Length, alignment::Vertical}, iced_wgpu::graphics::text::cosmic_text::fontdb, iced_widget::{column, row}, theme, widget::{ button, combo_box, container, horizontal_space, icon, progress_bar, scrollable, text, text_editor, text_input, }, }; use dirs::font_dir; use iced_video_player::Video; use rayon::iter::{IntoParallelIterator, ParallelIterator}; use tracing::{debug, error}; use crate::{ Background, BackgroundKind, core::{service_items::ServiceTrait, slide::Slide, songs::Song}, ui::{ presenter::slide_view, slide_editor::SlideEditor, text_svg, }, }; #[derive(Debug)] pub struct SongEditor { pub song: Option, title: String, font_db: Arc, 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