#pragma once

#include <QGeoCoordinate>
#include <QObject>

#include "WimaAreaData.h"
#include "WimaMeasurementArea.h"

class WimaMeasurementAreaData : public WimaAreaData {
  Q_OBJECT

public:
  WimaMeasurementAreaData(QObject *parent = nullptr);
  WimaMeasurementAreaData(const WimaMeasurementAreaData &other,
                          QObject *parent = nullptr);
  WimaMeasurementAreaData(const WimaMeasurementArea &other,
                          QObject *parent = nullptr);
  WimaMeasurementAreaData &operator=(const WimaMeasurementAreaData &other);
  WimaMeasurementAreaData &operator=(const WimaMeasurementArea &other);

  QString type() const;
  WimaMeasurementAreaData *Clone() const {
    return new WimaMeasurementAreaData(*this);
  }

  QmlObjectListModel *tiles();
  const QmlObjectListModel *tiles() const;
  const QVariantList &tileCenterPoints() const;
  QVariantList &tileCenterPoints();
  const TileData &tileData() const;
  TileData &tileData();
  const QVector<int> &progress() const;
  QVector<int> &progress();

  static const char *typeString;

protected:
  void assign(const WimaMeasurementAreaData &other);
  void assign(const WimaMeasurementArea &other);

private:
  TileData _tileData;
  QVector<int> _progress;
};
