#include <Wt/WStandardItem>
#include <Wt/WStandardItemModel>

#include <boost/lexical_cast.hpp>

auto topLevelRows    = 300;
auto secondLevelRows = 300;

namespace eedb {
class CategoriesModel final : public Wt::WStandardItemModel {
  public:
    CategoriesModel(Wt::WObject * parent) : Wt::WStandardItemModel(parent) {
        auto model = this;
        auto root  = model->invisibleRootItem();
        for(int row = 0; row < topLevelRows; ++row) {
            Wt::WStandardItem * topLevel = new Wt::WStandardItem();
            topLevel->setText("Item " + boost::lexical_cast< std::string >(row));
            for(int row2 = 0; row2 < secondLevelRows; ++row2) {
                Wt::WStandardItem * item = new Wt::WStandardItem();
                item->setToolTip("this is a tooltip");
                item->setText("Item " + boost::lexical_cast< std::string >(row) + ": " + boost::lexical_cast< std::string >(row2));
                topLevel->appendRow(item);
            }
            root->appendRow(topLevel);
        }
    }

  private:
};
}
