#include <string>
#include <vector>

#include <Widget/TabList/TabList.hpp>
#include <Widget/Layout/CompoundWidget/CompoundWidget.hpp>
#include <MachineComponent/DataCableComponent/DataCableComponent.hpp>
#include <RemoteDataComponent/RemoteDataComponent.hpp>
#include <Widget/Layout/CompoundWidget/DataChannelSelector/DataChannelSelector.hpp>
#include <Widget/EnumSelector/EnumSelector.hpp>

/**
 * @brief A widget for configuring data inputs of a machine.
 */
class DataInputTable : public CompoundWidget
{
public:
    typedef EnumSelector<std::string> VerbSelector;
    typedef VerbSelector::Option VerbOption;

private:
    static constexpr int naturalHeight = 120;

    std::vector<VerbOption> verbOptions;

    Widget* makeRuleRow(
        RemoteDataComponent &remoteDataComponent,
        std::vector<DataCableComponent::InputRule> &rules,
        size_t index
    );

public:
    DataInputTable(
        std::vector<DataCableComponent::InputRule> &inputRules,
        RemoteDataComponent &remoteDataComponent,
        const std::vector<VerbOption> &verbOptions
    );
};