#pragma once

#include <QObject>

#include "WimaAreaData.h"
#include "WimaServiceAreaData.h"
#include "WimaCorridorData.h"
#include "WimaMeasurementAreaData.h"
#include "WimaJoinedAreaData.h"
#include "MissionItem.h"

class WimaPlanData : public QObject
{
    Q_OBJECT
public:
    WimaPlanData(QObject *parent = nullptr);
    WimaPlanData(const WimaPlanData &other, QObject *parent = nullptr);
    WimaPlanData& operator=(const WimaPlanData &other);

    // Member Methodes
    void append(const WimaJoinedAreaData        &areaData);
    void append(const WimaServiceAreaData       &areaData);
    void append(const WimaCorridorData          &areaData);
    void append(const WimaMeasurementAreaData   &areaData);
    void append(const QList<MissionItem *>      &missionItems);
    void clear();

    QList<const WimaAreaData *> areaList() const;
    QList<QSharedPointer<const MissionItem>> missionItems() const;



signals:
    void areaListChanged();

private:
    void _clearAndDeleteMissionItems();

private:
    WimaJoinedAreaData      _joinedArea;
    WimaServiceAreaData     _serviceArea;
    WimaCorridorData        _corridor;
    WimaMeasurementAreaData _measurementArea;
    QList<const WimaAreaData *>    _areaList;

    QList<QSharedPointer<const MissionItem>> _missionItems;
};
