#pragma once

#include <vector>

#include "BuildingId.h"
#include "SelectionContent.h"
#include "SelectionContentFactory.h"

class BeltItemList;

// The card for a belt, a tunnel entry or a tunnel exit (REQ-UI-SELECTION-CONTENT). These
// carry no configuration and no buffers of their own; their card is what the tiles are
// carrying with the clear action beneath it (REQ-UI-BELT-ITEMS, REQ-UI-BELT-CLEAR).
//
// Because both parts read and act on the whole selection, any mix of belt-subsystem tiles
// aggregates into this one card with the count in the header
// (REQ-UI-SELECTION-AGGREGATE) -- splitters among them, whose per-object output filters
// are simply not shown for an aggregate; a lone splitter gets its own card instead
// (SplitterContent).
class BeltContent : public SelectionContent
{
    Q_OBJECT

public:
    BeltContent(const SelectionContext& context, const SelectionRequest& request,
                QWidget* parent = nullptr);

protected:
    void refreshConfiguration() override;
    void refreshRuntime() override;

private:
    std::vector<BuildingId> m_ids;
    BeltItemList*           m_itemList;
};
