#pragma once

#include "QGeoCoordinate"
#include <QObject>

#include "WimaAreaData.h"
#include "WimaServiceArea.h"

class WimaServiceAreaData : public WimaAreaData {
  Q_OBJECT

public:
  WimaServiceAreaData(QObject *parent = nullptr);
  WimaServiceAreaData(const WimaServiceAreaData &other,
                      QObject *parent = nullptr);
  WimaServiceAreaData(const WimaServiceArea &other, QObject *parent = nullptr);
  WimaServiceAreaData &operator=(const WimaServiceAreaData &otherData);
  WimaServiceAreaData &operator=(const WimaServiceArea &otherArea);

  virtual QString mapVisualQML() const override;

  const QGeoCoordinate &depot() const;

  QString type() const;
  WimaServiceAreaData *Clone() const { return new WimaServiceAreaData(); }
  static const char *typeString;

signals:
  void depotChanged(const QGeoCoordinate &other);

public slots:
  void setDepot(const QGeoCoordinate &newCoordinate);

protected:
  void assign(const WimaServiceAreaData &other);
  void assign(const WimaServiceArea &other);

private:
  // see WimaServieArea.h for explanation
  QGeoCoordinate _depot;
};
