/*
 * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: Apache-2.0
 */
// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.0
// LVGL version: 9.1.0
// Project name: Smart_Gadget

#include "../ui.h"

void ui_screen_clock_screen_init(void)
{
    ui_screen_clock = lv_obj_create(NULL);
    lv_obj_remove_flag(ui_screen_clock, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_image_src(ui_screen_clock, &ui_img_pattern_png, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_image_tiled(ui_screen_clock, true, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_clock_panel_clock_panel = lv_obj_create(ui_screen_clock);
    lv_obj_set_width(ui_clock_panel_clock_panel, 180);
    lv_obj_set_height(ui_clock_panel_clock_panel, 180);
    lv_obj_set_x(ui_clock_panel_clock_panel, 0);
    lv_obj_set_y(ui_clock_panel_clock_panel, 40);
    lv_obj_set_align(ui_clock_panel_clock_panel, LV_ALIGN_CENTER);
    lv_obj_remove_flag(ui_clock_panel_clock_panel, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_clock_panel_clock_panel, 500, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_clock_panel_clock_panel, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_clock_panel_clock_panel, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_clock_clock_dot_dot1 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot1, -40);
    lv_obj_set_y(ui_clock_clock_dot_dot1, 15);
    lv_obj_set_align(ui_clock_clock_dot_dot1, LV_ALIGN_TOP_RIGHT);

    ui_clock_clock_dot_dot2 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot2, -10);
    lv_obj_set_y(ui_clock_clock_dot_dot2, 50);

    ui_clock_clock_dot_dot3 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot3, 40);
    lv_obj_set_y(ui_clock_clock_dot_dot3, 15);
    lv_obj_set_align(ui_clock_clock_dot_dot3, LV_ALIGN_TOP_LEFT);

    ui_clock_clock_dot_dot4 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot4, 10);
    lv_obj_set_y(ui_clock_clock_dot_dot4, 50);
    lv_obj_set_align(ui_clock_clock_dot_dot4, LV_ALIGN_TOP_LEFT);

    ui_clock_clock_dot_dot5 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot5, 10);
    lv_obj_set_y(ui_clock_clock_dot_dot5, -50);
    lv_obj_set_align(ui_clock_clock_dot_dot5, LV_ALIGN_BOTTOM_LEFT);

    ui_clock_clock_dot_dot6 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot6, 40);
    lv_obj_set_y(ui_clock_clock_dot_dot6, -15);
    lv_obj_set_align(ui_clock_clock_dot_dot6, LV_ALIGN_BOTTOM_LEFT);

    ui_clock_clock_dot_dot7 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot7, -10);
    lv_obj_set_y(ui_clock_clock_dot_dot7, -50);
    lv_obj_set_align(ui_clock_clock_dot_dot7, LV_ALIGN_BOTTOM_RIGHT);

    ui_clock_clock_dot_dot8 = ui_panel_clock_dot_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_clock_dot_dot8, -40);
    lv_obj_set_y(ui_clock_clock_dot_dot8, -15);
    lv_obj_set_align(ui_clock_clock_dot_dot8, LV_ALIGN_BOTTOM_RIGHT);

    ui_clock_small_label_clock_number1 = ui_label_small_label_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_small_label_clock_number1, 0);
    lv_obj_set_y(ui_clock_small_label_clock_number1, 0);

    ui_clock_small_label_clock_number2 = ui_label_small_label_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_small_label_clock_number2, 0);
    lv_obj_set_y(ui_clock_small_label_clock_number2, 0);
    lv_obj_set_align(ui_clock_small_label_clock_number2, LV_ALIGN_BOTTOM_MID);
    lv_label_set_text(ui_clock_small_label_clock_number2, "6");

    ui_clock_small_label_clock_number3 = ui_label_small_label_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_small_label_clock_number3, 0);
    lv_obj_set_y(ui_clock_small_label_clock_number3, 0);
    lv_obj_set_align(ui_clock_small_label_clock_number3, LV_ALIGN_LEFT_MID);
    lv_label_set_text(ui_clock_small_label_clock_number3, "9");

    ui_clock_small_label_clock_number4 = ui_label_small_label_create(ui_clock_panel_clock_panel);
    lv_obj_set_x(ui_clock_small_label_clock_number4, 0);
    lv_obj_set_y(ui_clock_small_label_clock_number4, 0);
    lv_obj_set_align(ui_clock_small_label_clock_number4, LV_ALIGN_RIGHT_MID);
    lv_label_set_text(ui_clock_small_label_clock_number4, "3");

    ui_clock_image_min = lv_image_create(ui_clock_panel_clock_panel);
    lv_image_set_src(ui_clock_image_min, &ui_img_clock_min_png);
    lv_obj_set_width(ui_clock_image_min, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_clock_image_min, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_clock_image_min, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_clock_image_min, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_clock_image_min, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_clock_image_hour = lv_image_create(ui_clock_panel_clock_panel);
    lv_image_set_src(ui_clock_image_hour, &ui_img_clock_hour_png);
    lv_obj_set_width(ui_clock_image_hour, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_clock_image_hour, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_clock_image_hour, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_clock_image_hour, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_clock_image_hour, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_clock_image_sec = lv_image_create(ui_clock_panel_clock_panel);
    lv_image_set_src(ui_clock_image_sec, &ui_img_clock_sec_png);
    lv_obj_set_width(ui_clock_image_sec, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_clock_image_sec, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_clock_image_sec, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_clock_image_sec, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_clock_image_sec, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_image_set_rotation(ui_clock_image_sec, 150);

    ui_clock_panel_clock_center = lv_obj_create(ui_clock_panel_clock_panel);
    lv_obj_set_width(ui_clock_panel_clock_center, 8);
    lv_obj_set_height(ui_clock_panel_clock_center, 8);
    lv_obj_set_align(ui_clock_panel_clock_center, LV_ALIGN_CENTER);
    lv_obj_remove_flag(ui_clock_panel_clock_center, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_clock_panel_clock_center, 10, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_clock_panel_clock_center, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_clock_panel_clock_center, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_clock_panel_clock_center, lv_color_hex(0x1937D2), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_clock_panel_clock_center, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_clock_panel_clock_center, 2, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_clock_label_clock_number = lv_label_create(ui_screen_clock);
    lv_obj_set_width(ui_clock_label_clock_number, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_clock_label_clock_number, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_clock_label_clock_number, 0);
    lv_obj_set_y(ui_clock_label_clock_number, 15);
    lv_obj_set_align(ui_clock_label_clock_number, LV_ALIGN_TOP_MID);
    lv_label_set_text(ui_clock_label_clock_number, "09:25");
    lv_obj_set_style_text_color(ui_clock_label_clock_number, lv_color_hex(0x293062), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_clock_label_clock_number, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_clock_label_clock_number, &ui_font_Number, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_clock_small_label_date = ui_label_small_label_create(ui_screen_clock);
    lv_obj_set_x(ui_clock_small_label_date, 0);
    lv_obj_set_y(ui_clock_small_label_date, 76);
    lv_label_set_text(ui_clock_small_label_date, "Mon 28 Oct");
    lv_obj_set_style_text_color(ui_clock_small_label_date, lv_color_hex(0x9C9CD9), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_clock_small_label_date, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_clock_scrolldots_scrolldots = ui_panel_scrolldots_create(ui_screen_clock);
    lv_obj_set_x(ui_clock_scrolldots_scrolldots, 0);
    lv_obj_set_y(ui_clock_scrolldots_scrolldots, -8);

    lv_obj_set_style_bg_color(ui_comp_get_child(ui_clock_scrolldots_scrolldots, UI_COMP_PANEL_SCROLLDOTS_PANEL_D1),
                              lv_color_hex(0x101C52), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_comp_get_child(ui_clock_scrolldots_scrolldots, UI_COMP_PANEL_SCROLLDOTS_PANEL_D1), 255,
                            LV_PART_MAIN | LV_STATE_DEFAULT);








    lv_obj_add_event_cb(ui_screen_clock, ui_event_screen_clock, LV_EVENT_ALL, NULL);

}
