#pragma once

#include "button.h"

class MenuDrop;

class CascadeMenuButton : public Button
{
public:
    explicit CascadeMenuButton(const std::string& text, const std::shared_ptr<kku::CoreFactory>& factory, unsigned int font_size = 12);
    virtual void input(const kku::SystemEvent& event) override final;
    virtual void setRect(const kku::Area<float>& rect) override final;

    void setSubmenu(const std::shared_ptr<MenuDrop>& submenu);
    const std::shared_ptr<MenuDrop> submenu() const;
    void resetRect();
    void setFillColors(kku::Color&& idle_color, kku::Color&& hover_color);

private:
    std::shared_ptr<MenuDrop> _submenu;

    kku::Color _color_idle;
    kku::Color _color_hover;
};

