import { environment } from '../environments/environment';

const api = (environment.apiUrl ?? '').replace(/\/$/, '');

export class ApiRoutes {
	static UserRegister = `${api}/api/user/register`;
	static UserLogin = `${api}/api/user/login`;
	static UserProfile = `${api}/api/user/profile`;
	static UserAttach = `${api}/api/user/attach`;
	static UserDeattach = `${api}/api/user/deattach`;

	static GeneralCurrencies = `${api}/api/general/currencies`;
	static SettingsCurrencies = `${api}/api/settings/currencies`;
	static SettingsCurrency = `${api}/api/settings/currencies/:id`;
	static SettingsCurrenciesRate = `${api}/api/settings/currencies/:id/rate`;

	static SettingsAccountCategories = `${api}/api/settings/account-categories`;
	static SettingsAccountCategory = `${api}/api/settings/account-categories/:id`;

	static SettingsAccounts = `${api}/api/settings/accounts`;
	static SettingsAccount = `${api}/api/settings/accounts/:id`;
	static SettingsAccountAccesses = `${api}/api/settings/accounts/:id/access`;
	static SettingsAccountAccess = `${api}/api/settings/accounts/:id/access/:access`;
	static SettingsAccountAccountCategory = `${api}/api/settings/accounts/:id/category/:categoryId`;
	static SettingsAccountInvites = `${api}/api/settings/accounts/invites`;
	static SettingsAccountInviteAccept = `${api}/api/settings/accounts/invites/:id/accept`;
	static SettingsAccountInviteReject = `${api}/api/settings/accounts/invites/:id/reject`;

	static SettingsItemCategories = `${api}/api/settings/item-categories`;
	static SettingsItemCategory = `${api}/api/settings/item-categories/:id`;

	static SettingsItems = `${api}/api/settings/items`;
	static SettingsItem = `${api}/api/settings/items/:id`;

	static Accounts = `${api}/api/accounts`;
	static Account = `${api}/api/accounts/:id`;

	static Motions = `${api}/api/accounts/:id/motions`;
	static Motion = `${api}/api/accounts/:id/motions/:motionId`;

	static Items = `${api}/api/items`;

	static Dashboard = `${api}/api/dashboard`;
	static DashboardIncome = `${api}/api/dashboard/income`;
	static DashboardOutcome = `${api}/api/dashboard/outcome`;
}
