// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.4
// LVGL version: 9.1.0
// Project name: your_chat_bot_WeChat

#include "../ui.h"
#include "lang_config.h"

// COMPONENT systemmsgcontainer

lv_obj_t *ui_systemmsgcontainer_create(lv_obj_t *comp_parent)
{

    lv_obj_t *cui_systemmsgcontainer;
    cui_systemmsgcontainer = lv_obj_create(comp_parent);
    lv_obj_remove_style_all(cui_systemmsgcontainer);
    lv_obj_set_width(cui_systemmsgcontainer, lv_pct(98));
    lv_obj_set_height(cui_systemmsgcontainer, LV_SIZE_CONTENT); /// 1
    lv_obj_set_align(cui_systemmsgcontainer, LV_ALIGN_CENTER);
    lv_obj_remove_flag(cui_systemmsgcontainer, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE); /// Flags
    lv_obj_set_style_pad_left(cui_systemmsgcontainer, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(cui_systemmsgcontainer, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(cui_systemmsgcontainer, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_pad_bottom(cui_systemmsgcontainer, 8, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t *cui_label;
    cui_label = lv_label_create(cui_systemmsgcontainer);
    lv_obj_set_align(cui_label, LV_ALIGN_CENTER);
    lv_label_set_long_mode(cui_label, LV_LABEL_LONG_WRAP);

    // Set font BEFORE text to avoid font cache issues
    lv_obj_set_style_text_font(cui_label, &ui_font_puhui_18_2, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_color(cui_label, lv_color_hex(0x95A5A6), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_align(cui_label, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_label_set_text(cui_label, SYSTEM_MSG_POWER_ON);

    lv_obj_t **children = lv_malloc(sizeof(lv_obj_t *) * _UI_COMP_SYSTEMMSGCONTAINER_NUM);
    children[UI_COMP_SYSTEMMSGCONTAINER_SYSTEMMSGCONTAINER] = cui_systemmsgcontainer;
    children[UI_COMP_SYSTEMMSGCONTAINER_LABEL]              = cui_label;
    lv_obj_add_event_cb(cui_systemmsgcontainer, get_component_child_event_cb, LV_EVENT_GET_COMP_CHILD, children);
    lv_obj_add_event_cb(cui_systemmsgcontainer, del_component_child_event_cb, LV_EVENT_DELETE, children);
    ui_comp_systemmsgcontainer_create_hook(cui_systemmsgcontainer);
    return cui_systemmsgcontainer;
}
