#include "display/ui/components/mascot.h"

#include "display/ui/components/primitives.h"

LV_IMAGE_DECLARE(hw_mascot_image);

namespace hwdisplay::ui::components {

bool Mascot::Create(lv_obj_t* parent, int x, int y) {
    root_ = Box(parent, x, y, 320, 320, 0xFFFFFF, 0, LV_OPA_TRANSP);
    if (!root_) return false;
    if (!Box(root_, 13, 10, 293, 293, 0xE1F7F2, LV_RADIUS_CIRCLE)) return false;
    if (!Box(root_, 263, 33, 34, 34, 0xFFDA99, LV_RADIUS_CIRCLE)) return false;

    lv_obj_t* image = lv_image_create(root_);
    if (!image) return false;
    lv_obj_remove_flag(image, LV_OBJ_FLAG_CLICKABLE);
    lv_image_set_src(image, &hw_mascot_image);
    lv_obj_set_pos(image, 25, 20);
    return true;
}

}  // namespace hwdisplay::ui::components
