/*******************************************************************************
***  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_ACCOUNTING_ACCOUNTTYPES_H_
#define DRN_ACCOUNTING_ACCOUNTTYPES_H_

#include <QtGlobal>

#include <array>
#include <iosfwd>

#include "accounting_export.h"


class QString;

namespace drn
{
namespace accounting
{

/**
 * @brief This represents the various forms an account may have within the accounting system.
 */
enum class DRN_ACCOUNTING_EXPORT AccountTypes : quint8
{
	/// This represents an account that is not initialised.
	Unknown,
	/// This represent the different types of economic resources owned or controlled by an entity.
	Asset,
	/// This represents the residual capital of an entity.
	Capital,
	/// This represents an entity's expenditures.
	Expense,
	/// This represents the different types of economic obligations of an entity.
	Liability,
	/// This represents an entity's earnings and/or income.
	Revenue,
};

DRN_ACCOUNTING_EXPORT std::ostream& operator<<(std::ostream& o, const AccountTypes& at);
DRN_ACCOUNTING_EXPORT AccountTypes toAccountTypes(const ::QString& weak);
DRN_ACCOUNTING_EXPORT ::QString presentationText(const AccountTypes& at);

constexpr quint8 numberOfAccountTypes{6};
extern DRN_ACCOUNTING_EXPORT const std::array<AccountTypes, numberOfAccountTypes> allAccountTypes;

}}

#endif
