import { lang } from "../index.js";
import AbstractAuthenticatedView from "./abstracts/AbstractAuthenticatedView.js";

export default class extends AbstractAuthenticatedView {
    constructor(params) {
        super(params, 'homeWindowTitle');
        this.redirect_url = "/login";
	}

    async getHtml() {
        return /* HTML */ `
			<h1>${lang.get('homeTitle', 'Home')}</h1>
            <a href="/matchmaking" data-link>${lang.get('homeOnline', 'Play online')}</a>
            <a href="/games/offline" data-link>${lang.get('homeOffline', 'Play offline')}</a>
			<a href="/tictactoe" data-link>${lang.get('ticTacToe')}</a>
            <a href="/settings" data-link>${lang.get('homeSettings', 'Settings')}</a>
            <a href="/logout" data-link>${lang.get('homeLogout', 'Logout')}</a>
        `;
    }
}
