globalThis.dlink = class {
	static LOGIN_PAGE = "/login";
	static STORAGE_KEY_LOGGEDIN = "mydlink_dashboard_login";

	/**
	 * @return {boolean}
	 */
	static get loggedin() {
		return sessionStorage.getItem(this.STORAGE_KEY_LOGGEDIN) === "true";
	}

	/**
	 * @param {boolean}
	 */
	static set loggedin(state) {
		return sessionStorage.setItem(this.STORAGE_KEY_LOGGEDIN, !!state);
	}

	/**
	 * @returns {void}
	 */
	static logout() {
		sessionStorage.removeItem(this.STORAGE_KEY_LOGGEDIN);
	}
}
