#pragma once

#include "GeometryNode.h"

#include <memory>

class RectangleNode : public GeometryNode
{
public:
    RectangleNode(const DiscretePoint& loc, unsigned width, unsigned height);
    static std::unique_ptr<RectangleNode> Create(const DiscretePoint& loc, unsigned width, unsigned height);
    GeometryNode::Type getType() override;

    unsigned getWidth() const;
    unsigned getHeight() const;

    SceneItem* getSceneItem(std::size_t idx) const override;
    unsigned getNumSceneItems() const override;

    void setWidth(unsigned width);
    void setHeight(unsigned height);

    void update(FontsManager* fontsManager) override;
private:
    unsigned mWidth{1};
    unsigned mHeight{1};

    std::unique_ptr<SceneModel> mBackgroundItem;
    std::unique_ptr<SceneModel> mOutlineItem;
};

using RectangleNodePtr = std::unique_ptr<RectangleNode>;


