use std::rc::Rc; use cosmic::{ iced::{ alignment::Vertical, clipboard::dnd::DndAction, futures::FutureExt, Background, Border, Color, Length, }, iced_core::widget::tree::State, iced_widget::{column, row as rowm, text as textm}, theme, widget::{ button, container, horizontal_space, icon, mouse_area, responsive, row, scrollable, text, text_input, Container, DndSource, Space, Widget, }, Element, Task, }; use miette::{IntoDiagnostic, Result}; use sqlx::{pool::PoolConnection, Sqlite, SqlitePool}; use tracing::{debug, error, warn}; use crate::core::{ content::Content, images::{update_image_in_db, Image}, model::{LibraryKind, Model}, presentations::{update_presentation_in_db, Presentation}, service_items::ServiceItem, songs::{update_song_in_db, Song}, videos::{update_video_in_db, Video}, }; #[derive(Debug, Clone)] pub(crate) struct Library { song_library: Model, image_library: Model, video_library: Model