/*
 * Mirai. Copyright (C) 2024 Vyn
 * This file is licensed under version 3 of the GNU General Public License (GPL-3.0-only)
 * The license can be found in the LICENSE file or at https://www.gnu.org/licenses/gpl-3.0.txt
 */

#pragma once

#include "DataProvider.h"
#include "Event.h"
#include <string>

namespace mirai
{

class Day;

class Task
{

  public:
	Task(DataProvider *data, TaskData task) : data_(data), task_(task) {};

	std::string title() const;
	mirai::TaskState state() const;
	bool checked() const;
	bool hasEvent() const;
	bool hasDate() const;

	void setTitle(const std::string &newTitle);
	void setDay(const Day &day);
	void setDate(const Date &date);
	void setEvent(const Event &event);
	void setChecked(bool checked);

	int id() const;
	int sourceId() const;

  private:
	TaskData task_;
	DataProvider *data_;
};

} // namespace mirai
