#pragma once

#include <eedb/widgets/CategoryThree.hpp>

#include <memory>

namespace eedb {

class DefaultCategoriesTree final : public CategoriesTree {
    // CategoriesTree interface
  public:
    DefaultCategoriesTree();
    ~DefaultCategoriesTree();

    DefaultCategoriesTree(const DefaultCategoriesTree &) = delete;
    DefaultCategoriesTree(DefaultCategoriesTree &&);

    // clang-format off
    DefaultCategoriesTree & operator=(const DefaultCategoriesTree &) = delete;
    DefaultCategoriesTree & operator=(DefaultCategoriesTree &&);
    // clang-format on

    void attachTo(Wt::WContainerWidget * parent) override;

    void registerOnCategoryChanged(std::function< void(const Category &) >) override;

  private:
    struct DefaultCategoriesTreePriv;
    std::unique_ptr< DefaultCategoriesTreePriv > _priv;
};
}
