use iced::{Length, alignment::Horizontal, widget::Column};

use crate::ui::main_window::{MainWindowMsg, TabContent};

#[derive(Default)]
pub struct JlcDownloader {}
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum JlcDownloaderMsg {
    Nothing,
}

impl TabContent for JlcDownloader {
    type TabMessage = JlcDownloaderMsg;

    fn update(&self, msg: Self::TabMessage) {
        match msg {
            JlcDownloaderMsg::Nothing => {
                println!("JlcDownloaderMsg::Nothing");
            }
        }
    }

    fn content(&self) -> iced::Element<'_, MainWindowMsg> {
        let btn = iced::widget::button("JlcDownloader")
            .on_press(MainWindowMsg::JlcDownloader(JlcDownloaderMsg::Nothing));

        Column::new()
            .align_x(Horizontal::Left)
            .width(Length::Fill)
            .height(Length::Fill)
            .push(btn)
            .into()
    }
}
