#![allow(unused_must_use)]

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

pub fn main() -> iced::Result {
    iced::application(App::new, App::update, App::view)
        .title("Lucide")
        .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(LUCIDE_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![
                activity(),
                airplay(),
                alarm_clock(),
                album(),
                align_center(),
                align_horizontal_distribute_center(),
                align_horizontal_distribute_end(),
                align_horizontal_distribute_start(),
                align_justify(),
                align_left(),
                align_right(),
                anchor(),
                aperture(),
                archive(),
                arrow_down(),
                arrow_down_left(),
                arrow_down_narrow_wide(),
                arrow_down_right(),
                arrow_down_up(),
                arrow_down_wide_narrow(),
                arrow_left(),
                arrow_right(),
                arrow_up(),
                arrow_up_left(),
                arrow_up_narrow_wide(),
                arrow_up_right(),
                at_sign(),
                award(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                axe(),
                ban(),
                banknote(),
                battery(),
                battery_charging(),
                battery_full(),
                battery_low(),
                battery_medium(),
                beaker(),
                bell(),
                bell_off(),
                bitcoin(),
                bluetooth(),
                bold(),
                book(),
                book_open(),
                bookmark(),
                r#box(),
                briefcase(),
                calendar(),
                camera(),
                camera_off(),
                cast(),
                chart_column_decreasing(),
                chart_no_axes_column(),
                chart_no_axes_column_decreasing(),
                chart_no_axes_column_increasing(),
                chart_pie(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                check(),
                chevron_down(),
                chevron_left(),
                chevron_right(),
                chevron_up(),
                chevrons_down(),
                chevrons_left(),
                chevrons_right(),
                chevrons_up(),
                chrome(),
                circle(),
                circle_alert(),
                circle_arrow_down(),
                circle_arrow_left(),
                circle_arrow_right(),
                circle_arrow_up(),
                circle_check_big(),
                circle_divide(),
                circle_help(),
                circle_minus(),
                circle_pause(),
                circle_play(),
                circle_plus(),
                circle_stop(),
                circle_x(),
                clipboard(),
                clipboard_list(),
                clock_four(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                cloud(),
                cloud_download(),
                cloud_drizzle(),
                cloud_hail(),
                cloud_lightning(),
                cloud_off(),
                cloud_rain(),
                cloud_rain_wind(),
                cloud_snow(),
                cloud_upload(),
                clover(),
                code(),
                codepen(),
                codesandbox(),
                coffee(),
                coins(),
                columns_two(),
                columns_three(),
                command(),
                compass(),
                contact(),
                contrast(),
                copy(),
                copyleft(),
                copyright(),
                corner_down_left(),
                corner_down_right(),
                corner_left_down(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                corner_left_up(),
                corner_right_down(),
                corner_right_up(),
                corner_up_left(),
                corner_up_right(),
                cpu(),
                credit_card(),
                crop(),
                crosshair(),
                database(),
                delete(),
                disc(),
                divide(),
                dollar_sign(),
                download(),
                dribbble(),
                droplet(),
                droplets(),
                ellipsis(),
                ellipsis_vertical(),
                euro(),
                external_link(),
                eye(),
                eye_off(),
                facebook(),
                fast_forward(),
                feather(),
                figma(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                file(),
                file_check(),
                file_check_two(),
                file_code(),
                file_digit(),
                file_input(),
                file_minus(),
                file_minus_two(),
                file_output(),
                file_plus(),
                file_plus_two(),
                file_search(),
                file_text(),
                file_x(),
                file_x_two(),
                files(),
                film(),
                flag(),
                flame(),
                flashlight(),
                flashlight_off(),
                flask_conical(),
                flask_round(),
                folder(),
                folder_minus(),
                folder_plus(),
                framer(),
                frown(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                funnel(),
                funnel_plus(),
                gamepad(),
                gamepad_two(),
                gavel(),
                gift(),
                git_branch(),
                git_commit_horizontal(),
                git_merge(),
                git_pull_request(),
                github(),
                gitlab(),
                globe(),
                grid_threexthree(),
                grip_horizontal(),
                grip_vertical(),
                hammer(),
                hard_drive(),
                hard_hat(),
                hash(),
                haze(),
                headphones(),
                heart(),
                hexagon(),
                highlighter(),
                house(),
                image(),
                inbox(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                indent_decrease(),
                indent_increase(),
                indian_rupee(),
                info(),
                instagram(),
                italic(),
                japanese_yen(),
                key(),
                languages(),
                layout_grid(),
                library(),
                life_buoy(),
                link(),
                link_two(),
                link_two_off(),
                linkedin(),
                list(),
                loader(),
                loader_circle(),
                lock(),
                lock_open(),
                log_in(),
                log_out(),
                mail(),
                map(),
                map_pin(),
                maximize(),
                maximize_two(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                meh(),
                menu(),
                message_circle(),
                message_square(),
                mic(),
                mic_off(),
                minimize(),
                minimize_two(),
                minus(),
                monitor(),
                moon(),
                mouse_pointer(),
                mouse_pointer_click(),
                r#move(),
                music(),
                navigation(),
                navigation_two(),
                network(),
                octagon(),
                octagon_alert(),
                octagon_x(),
                package(),
                panel_left(),
                panels_left_bottom(),
                panels_top_left(),
                paperclip(),
                pause(),
                pen(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                pen_line(),
                pen_tool(),
                percent(),
                phone(),
                phone_call(),
                phone_forwarded(),
                phone_incoming(),
                phone_missed(),
                phone_off(),
                phone_outgoing(),
                piggy_bank(),
                pipette(),
                play(),
                plus(),
                pocket(),
                pound_sterling(),
                power(),
                printer(),
                radio(),
                redo(),
                refresh_ccw(),
                refresh_cw(),
                repeat(),
                rewind(),
                rotate_ccw(),
                rotate_cw(),
                rss(),
                ruler(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                russian_ruble(),
                save(),
                scissors(),
                screen_share(),
                screen_share_off(),
                search(),
                send(),
                server(),
                settings(),
                share(),
                share_two(),
                sheet(),
                shield(),
                shield_ban(),
                shield_off(),
                shopping_bag(),
                shopping_cart(),
                shovel(),
                shuffle(),
                skip_back(),
                skip_forward(),
                slack(),
                sliders_vertical(),
                smartphone(),
                smile(),
                snowflake(),
                speaker(),
                square(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                square_asterisk(),
                square_chart_gantt(),
                square_check_big(),
                square_code(),
                square_dashed_kanban(),
                square_divide(),
                square_dot(),
                square_equal(),
                square_kanban(),
                square_minus(),
                square_pen(),
                square_plus(),
                square_slash(),
                square_x(),
                star(),
                strikethrough(),
                sun(),
                sunrise(),
                sunset(),
                swiss_franc(),
                switch_camera(),
                table(),
                tablet(),
                tag(),
                target(),
                terminal(),
                thermometer(),
                thermometer_snowflake(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                thermometer_sun(),
                thumbs_down(),
                thumbs_up(),
                toggle_left(),
                toggle_right(),
                trash(),
                trash_two(),
                trello(),
                trending_down(),
                trending_up(),
                triangle(),
                triangle_alert(),
                truck(),
                tv(),
                twitch(),
                twitter(),
                r#type(),
                umbrella(),
                underline(),
                undo(),
                unlink(),
                unlink_two(),
                upload(),
                user(),
                user_check(),
                user_minus(),
                user_plus(),
                user_x(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                users(),
                video(),
                video_off(),
                view(),
                voicemail(),
                volume(),
                volume_one(),
                volume_two(),
                volume_x(),
                watch(),
                wifi(),
                wifi_off(),
                wind(),
                wrench(),
                x(),
                youtube(),
                zap(),
                zap_off(),
                zoom_in(),
                zoom_out(),
                bluetooth_connected(),
                bluetooth_off(),
                bluetooth_searching(),
                bot(),
                calculator(),
                equal(),
                equal_not(),
                gauge(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                image_off(),
                layout_dashboard(),
                lightbulb(),
                mouse_pointer_two(),
                move_diagonal(),
                move_diagonal_two(),
                move_horizontal(),
                move_vertical(),
                separator_horizontal(),
                separator_vertical(),
                shirt(),
                square_dashed(),
                building(),
                laptop(),
                lasso(),
                lasso_select(),
                list_checks(),
                list_ordered(),
                bike(),
                brush(),
                bus(),
                car(),
                crown(),
                hand(),
                laptop_minimal(),
                layout_list(),
                locate(),
                locate_fixed(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                monitor_off(),
                palette(),
                plane(),
                qr_code(),
                timer(),
                arrow_big_down(),
                arrow_big_left(),
                arrow_big_right(),
                arrow_big_up(),
                cross(),
                grab(),
                infinity(),
                pointer(),
                server_crash(),
                server_off(),
                sprout(),
                alarm_clock_check(),
                alarm_clock_minus(),
                alarm_clock_plus(),
                asterisk(),
                bell_minus(),
                bell_plus(),
                binary(),
                earth(),
                git_branch_plus(),
                history(),
                image_minus(),
                image_plus(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                option(),
                pencil(),
                podcast(),
                radio_receiver(),
                regex(),
                repeat_one(),
                shield_alert(),
                shield_check(),
                shield_x(),
                sigma(),
                square_mouse_pointer(),
                tv_minimal(),
                wallet(),
                webcam(),
                code_xml(),
                layout_template(),
                lightbulb_off(),
                power_off(),
                square_terminal(),
                star_half(),
                bug(),
                glasses(),
                ghost(),
                ticket(),
                monitor_speaker(),
                chevrons_up_down(),
                scale(),
                circle_slash_two(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
            row![
                cloud_fog(),
                cloud_moon(),
                cloud_sun(),
                cloudy(),
                tornado(),
                clipboard_check(),
                expand(),
                octagon_pause(),
                panel_left_close(),
                panel_left_open(),
                person_standing(),
                rectangle_ellipsis(),
                shrink(),
                skull(),
                clipboard_x(),
                vibrate(),
                bell_ring(),
                clipboard_copy(),
                circle_check(),
                tent(),
                chevrons_down_up(),
                forward(),
                reply(),
                reply_all(),
                hand_metal(),
                square_function(),
                smartphone_charging(),
                import(),
            ]
            .padding(12)
            .spacing(20)
            .width(Length::Fill)
            .align_y(Center),
        ]
        .into()
    }
}
