/*******************************************************************************
***  This file is part of Dux Rei Nummariae.                                 ***
***                                                                          ***
***  Copyright (C) 2017, 2018, 2019, 2020, 2021                              ***
***  John Schneiderman <Licensing _AT_ Schneiderman _DOT_ me>                ***
***                                                                          ***
***  This program is free software: you can redistribute it and/or modify it ***
***  under the terms of the GNU Affero General Public License as published   ***
***  by the Free Software Foundation, either version 3 of the License, or    ***
***  (at your option) any later version.                                     ***
***                                                                          ***
***  This program is distributed in the hope that it will be useful, but     ***
***  WITHOUT ANY WARRANTY; without even the implied warranty of              ***
***  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    ***
***  See the GNU Affero General Public License for more details.             ***
***                                                                          ***
***  You should have received a copy of the GNU Affero General Public License***
***  along with this program. If not, see <http://www.gnu.org/licenses/>.    ***
*******************************************************************************/
#ifndef DRN_BUDGETING_BUDGETITEMTYPES_H_
#define DRN_BUDGETING_BUDGETITEMTYPES_H_

#include <QtGlobal>

#include <array>
#include <iosfwd>
#include <typeindex>

#include "budgeting_export.h"


class QString;

namespace drn
{
namespace budgeting
{

enum class DRN_BUDGETING_EXPORT BudgetItemTypes : quint8
{
	Unknown,
	Bill,
	Debt,
	Goal,
	Nontrack,
	Wage,
};

DRN_BUDGETING_EXPORT std::ostream& operator<<(std::ostream& o, const BudgetItemTypes& bit);
DRN_BUDGETING_EXPORT ::QString presentationText(const BudgetItemTypes& bit);
DRN_BUDGETING_EXPORT BudgetItemTypes toBudgetItemTypes(const ::QString& raw);
DRN_BUDGETING_EXPORT BudgetItemTypes toBudgetItemTypes(const std::type_index& type);

constexpr const quint8 numberBudgetItemTypes{6u};
DRN_BUDGETING_EXPORT extern const std::array<
	BudgetItemTypes,
	numberBudgetItemTypes
> allBudgetItemTypes;

}}

#endif
