#![allow(unused_must_use)]

use iced::{
    Center, Element, Length, Task, font,
    widget::{column, row},
};
use iced_fonts::{BOOTSTRAP_FONT_BYTES, bootstrap::*};

pub fn main() -> iced::Result {
    iced::application(App::new, App::update, App::view)
        .title("Bootstrap")
        .run()
}

#[derive(Default)]
struct App {}

#[derive(Debug, Clone, Copy)]
enum Message {
    FontLoaded(Result<(), font::Error>),
}

impl App {
    fn new() -> (Self, Task<Message>) {
        (
            Self {},
            Task::batch(vec![
                font::load(BOOTSTRAP_FONT_BYTES).map(Message::FontLoaded),
            ]),
        )
    }

    fn update(&mut self, message: Message) {
        match message {
            Message::FontLoaded(result) => {
                dbg!(result);
            }
        }
    }

    fn view(&self) -> Element<Message> {
        column![
            row![
                alarm_fill(),
                alarm(),
                align_bottom(),
                align_center(),
                align_end(),
                align_middle(),
                align_start(),
                align_top(),
                alt(),
                app_indicator(),
                app(),
                archive_fill(),
                archive(),
                arrow_ninezerodeg_down(),
                arrow_ninezerodeg_left(),
                arrow_ninezerodeg_right(),
                arrow_ninezerodeg_up(),
                arrow_bar_down(),
                arrow_bar_left(),
                arrow_bar_right(),
                arrow_bar_up(),
                arrow_clockwise(),
                arrow_counterclockwise(),
                arrow_down_circle_fill(),
                arrow_down_circle(),
                arrow_down_left_circle_fill(),
                arrow_down_left_circle(),
                arrow_down_left_square_fill(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                arrow_down_left_square(),
                arrow_down_left(),
                arrow_down_right_circle_fill(),
                arrow_down_right_circle(),
                arrow_down_right_square_fill(),
                arrow_down_right_square(),
                arrow_down_right(),
                arrow_down_short(),
                arrow_down_square_fill(),
                arrow_down_square(),
                arrow_down_up(),
                arrow_down(),
                arrow_left_circle_fill(),
                arrow_left_circle(),
                arrow_left_right(),
                arrow_left_short(),
                arrow_left_square_fill(),
                arrow_left_square(),
                arrow_left(),
                arrow_repeat(),
                arrow_return_left(),
                arrow_return_right(),
                arrow_right_circle_fill(),
                arrow_right_circle(),
                arrow_right_short(),
                arrow_right_square_fill(),
                arrow_right_square(),
                arrow_right(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                arrow_up_circle_fill(),
                arrow_up_circle(),
                arrow_up_left_circle_fill(),
                arrow_up_left_circle(),
                arrow_up_left_square_fill(),
                arrow_up_left_square(),
                arrow_up_left(),
                arrow_up_right_circle_fill(),
                arrow_up_right_circle(),
                arrow_up_right_square_fill(),
                arrow_up_right_square(),
                arrow_up_right(),
                arrow_up_short(),
                arrow_up_square_fill(),
                arrow_up_square(),
                arrow_up(),
                arrows_angle_contract(),
                arrows_angle_expand(),
                arrows_collapse(),
                arrows_expand(),
                arrows_fullscreen(),
                arrows_move(),
                aspect_ratio_fill(),
                aspect_ratio(),
                asterisk(),
                at(),
                award_fill(),
                award(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                back(),
                backspace_fill(),
                backspace_reverse_fill(),
                backspace_reverse(),
                backspace(),
                badge_threed_fill(),
                badge_threed(),
                badge_fourk_fill(),
                badge_fourk(),
                badge_eightk_fill(),
                badge_eightk(),
                badge_ad_fill(),
                badge_ad(),
                badge_ar_fill(),
                badge_ar(),
                badge_cc_fill(),
                badge_cc(),
                badge_hd_fill(),
                badge_hd(),
                badge_tm_fill(),
                badge_tm(),
                badge_vo_fill(),
                badge_vo(),
                badge_vr_fill(),
                badge_vr(),
                badge_wc_fill(),
                badge_wc(),
                bag_check_fill(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                bag_check(),
                bag_dash_fill(),
                bag_dash(),
                bag_fill(),
                bag_plus_fill(),
                bag_plus(),
                bag_x_fill(),
                bag_x(),
                bag(),
                bar_chart_fill(),
                bar_chart_line_fill(),
                bar_chart_line(),
                bar_chart_steps(),
                bar_chart(),
                basket_fill(),
                basket(),
                baskettwo_fill(),
                baskettwo(),
                basketthree_fill(),
                basketthree(),
                battery_charging(),
                battery_full(),
                battery_half(),
                battery(),
                bell_fill(),
                bell(),
                bezier(),
                beziertwo(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                bicycle(),
                binoculars_fill(),
                binoculars(),
                blockquote_left(),
                blockquote_right(),
                book_fill(),
                book_half(),
                book(),
                bookmark_check_fill(),
                bookmark_check(),
                bookmark_dash_fill(),
                bookmark_dash(),
                bookmark_fill(),
                bookmark_heart_fill(),
                bookmark_heart(),
                bookmark_plus_fill(),
                bookmark_plus(),
                bookmark_star_fill(),
                bookmark_star(),
                bookmark_x_fill(),
                bookmark_x(),
                bookmark(),
                bookmarks_fill(),
                bookmarks(),
                bookshelf(),
                bootstrap_fill(),
                bootstrap_reboot(),
                bootstrap(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                border_all(),
                border_bottom(),
                border_center(),
                border_inner(),
                border_left(),
                border_middle(),
                border_outer(),
                border_right(),
                border_style(),
                border_top(),
                border_width(),
                border(),
                bounding_box_circles(),
                bounding_box(),
                box_arrow_down_left(),
                box_arrow_down_right(),
                box_arrow_down(),
                box_arrow_in_down_left(),
                box_arrow_in_down_right(),
                box_arrow_in_down(),
                box_arrow_in_left(),
                box_arrow_in_right(),
                box_arrow_in_up_left(),
                box_arrow_in_up_right(),
                box_arrow_in_up(),
                box_arrow_left(),
                box_arrow_right(),
                box_arrow_up_left(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                box_arrow_up_right(),
                box_arrow_up(),
                box_seam(),
                r#box(),
                braces(),
                bricks(),
                briefcase_fill(),
                briefcase(),
                brightness_alt_high_fill(),
                brightness_alt_high(),
                brightness_alt_low_fill(),
                brightness_alt_low(),
                brightness_high_fill(),
                brightness_high(),
                brightness_low_fill(),
                brightness_low(),
                broadcast_pin(),
                broadcast(),
                brush_fill(),
                brush(),
                bucket_fill(),
                bucket(),
                bug_fill(),
                bug(),
                building(),
                bullseye(),
                calculator_fill(),
                calculator(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                calendar_check_fill(),
                calendar_check(),
                calendar_date_fill(),
                calendar_date(),
                calendar_day_fill(),
                calendar_day(),
                calendar_event_fill(),
                calendar_event(),
                calendar_fill(),
                calendar_minus_fill(),
                calendar_minus(),
                calendar_month_fill(),
                calendar_month(),
                calendar_plus_fill(),
                calendar_plus(),
                calendar_range_fill(),
                calendar_range(),
                calendar_week_fill(),
                calendar_week(),
                calendar_x_fill(),
                calendar_x(),
                calendar(),
                calendartwo_check_fill(),
                calendartwo_check(),
                calendartwo_date_fill(),
                calendartwo_date(),
                calendartwo_day_fill(),
                calendartwo_day(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                calendartwo_event_fill(),
                calendartwo_event(),
                calendartwo_fill(),
                calendartwo_minus_fill(),
                calendartwo_minus(),
                calendartwo_month_fill(),
                calendartwo_month(),
                calendartwo_plus_fill(),
                calendartwo_plus(),
                calendartwo_range_fill(),
                calendartwo_range(),
                calendartwo_week_fill(),
                calendartwo_week(),
                calendartwo_x_fill(),
                calendartwo_x(),
                calendartwo(),
                calendarthree_event_fill(),
                calendarthree_event(),
                calendarthree_fill(),
                calendarthree_range_fill(),
                calendarthree_range(),
                calendarthree_week_fill(),
                calendarthree_week(),
                calendarthree(),
                calendarfour_event(),
                calendarfour_range(),
                calendarfour_week(),
                calendarfour(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                camera_fill(),
                camera_reels_fill(),
                camera_reels(),
                camera_video_fill(),
                camera_video_off_fill(),
                camera_video_off(),
                camera_video(),
                camera(),
                cameratwo(),
                capslock_fill(),
                capslock(),
                card_checklist(),
                card_heading(),
                card_image(),
                card_list(),
                card_text(),
                caret_down_fill(),
                caret_down_square_fill(),
                caret_down_square(),
                caret_down(),
                caret_left_fill(),
                caret_left_square_fill(),
                caret_left_square(),
                caret_left(),
                caret_right_fill(),
                caret_right_square_fill(),
                caret_right_square(),
                caret_right(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                caret_up_fill(),
                caret_up_square_fill(),
                caret_up_square(),
                caret_up(),
                cart_check_fill(),
                cart_check(),
                cart_dash_fill(),
                cart_dash(),
                cart_fill(),
                cart_plus_fill(),
                cart_plus(),
                cart_x_fill(),
                cart_x(),
                cart(),
                carttwo(),
                cartthree(),
                cartfour(),
                cash_stack(),
                cash(),
                cast(),
                chat_dots_fill(),
                chat_dots(),
                chat_fill(),
                chat_left_dots_fill(),
                chat_left_dots(),
                chat_left_fill(),
                chat_left_quote_fill(),
                chat_left_quote(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                chat_left_text_fill(),
                chat_left_text(),
                chat_left(),
                chat_quote_fill(),
                chat_quote(),
                chat_right_dots_fill(),
                chat_right_dots(),
                chat_right_fill(),
                chat_right_quote_fill(),
                chat_right_quote(),
                chat_right_text_fill(),
                chat_right_text(),
                chat_right(),
                chat_square_dots_fill(),
                chat_square_dots(),
                chat_square_fill(),
                chat_square_quote_fill(),
                chat_square_quote(),
                chat_square_text_fill(),
                chat_square_text(),
                chat_square(),
                chat_text_fill(),
                chat_text(),
                chat(),
                check_all(),
                check_circle_fill(),
                check_circle(),
                check_square_fill(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                check_square(),
                check(),
                checktwo_all(),
                checktwo_circle(),
                checktwo_square(),
                checktwo(),
                chevron_bar_contract(),
                chevron_bar_down(),
                chevron_bar_expand(),
                chevron_bar_left(),
                chevron_bar_right(),
                chevron_bar_up(),
                chevron_compact_down(),
                chevron_compact_left(),
                chevron_compact_right(),
                chevron_compact_up(),
                chevron_contract(),
                chevron_double_down(),
                chevron_double_left(),
                chevron_double_right(),
                chevron_double_up(),
                chevron_down(),
                chevron_expand(),
                chevron_left(),
                chevron_right(),
                chevron_up(),
                circle_fill(),
                circle_half(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                circle_square(),
                circle(),
                clipboard_check(),
                clipboard_data(),
                clipboard_minus(),
                clipboard_plus(),
                clipboard_x(),
                clipboard(),
                clock_fill(),
                clock_history(),
                clock(),
                cloud_arrow_down_fill(),
                cloud_arrow_down(),
                cloud_arrow_up_fill(),
                cloud_arrow_up(),
                cloud_check_fill(),
                cloud_check(),
                cloud_download_fill(),
                cloud_download(),
                cloud_drizzle_fill(),
                cloud_drizzle(),
                cloud_fill(),
                cloud_fog_fill(),
                cloud_fog(),
                cloud_fogtwo_fill(),
                cloud_fogtwo(),
                cloud_hail_fill(),
                cloud_hail(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                alphabet_uppercase(),
                cloud_haze_fill(),
                cloud_haze(),
                cloud_hazetwo_fill(),
                cloud_lightning_fill(),
                cloud_lightning_rain_fill(),
                cloud_lightning_rain(),
                cloud_lightning(),
                cloud_minus_fill(),
                cloud_minus(),
                cloud_moon_fill(),
                cloud_moon(),
                cloud_plus_fill(),
                cloud_plus(),
                cloud_rain_fill(),
                cloud_rain_heavy_fill(),
                cloud_rain_heavy(),
                cloud_rain(),
                cloud_slash_fill(),
                cloud_slash(),
                cloud_sleet_fill(),
                cloud_sleet(),
                cloud_snow_fill(),
                cloud_snow(),
                cloud_sun_fill(),
                cloud_sun(),
                cloud_upload_fill(),
                cloud_upload(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                cloud(),
                clouds_fill(),
                clouds(),
                cloudy_fill(),
                cloudy(),
                code_slash(),
                code_square(),
                code(),
                collection_fill(),
                collection_play_fill(),
                collection_play(),
                collection(),
                columns_gap(),
                columns(),
                command(),
                compass_fill(),
                compass(),
                cone_striped(),
                cone(),
                controller(),
                cpu_fill(),
                cpu(),
                credit_card_two_back_fill(),
                credit_card_two_back(),
                credit_card_two_front_fill(),
                credit_card_two_front(),
                credit_card_fill(),
                credit_card(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                crop(),
                cup_fill(),
                cup_straw(),
                cup(),
                cursor_fill(),
                cursor_text(),
                cursor(),
                dash_circle_dotted(),
                dash_circle_fill(),
                dash_circle(),
                dash_square_dotted(),
                dash_square_fill(),
                dash_square(),
                dash(),
                diagram_two_fill(),
                diagram_two(),
                diagram_three_fill(),
                diagram_three(),
                diamond_fill(),
                diamond_half(),
                diamond(),
                dice_one_fill(),
                dice_one(),
                dice_two_fill(),
                dice_two(),
                dice_three_fill(),
                dice_three(),
                dice_four_fill(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
        ]
        .into()
    }
}
