package de.thpeetz.kontor.tysc;

import com.vaadin.flow.component.icon.VaadinIcon;
import com.vaadin.flow.component.sidenav.SideNavItem;
import com.vaadin.flow.router.RouterLink;

import de.thpeetz.kontor.tysc.views.CardSetView;
import de.thpeetz.kontor.tysc.views.CardView;
import de.thpeetz.kontor.tysc.views.PlayerView;
import de.thpeetz.kontor.tysc.views.PositionView;
import de.thpeetz.kontor.tysc.views.RoosterView;
import de.thpeetz.kontor.tysc.views.SportView;
import de.thpeetz.kontor.tysc.views.TeamView;
import de.thpeetz.kontor.tysc.views.VendorView;

/**
 * The {@code TyscConstants} class contains constant values related to tysc.
 */
public class TyscConstants {

    public static final String TYSC = "TradeYourSportsCards";
    public static final String TYSC_ROLE = "ROLE_TYSC";
    public static final String VENDOR = "Vendor";
    public static final String VENDOR_ROUTE = "tysc/vendor";
    public static final String CARDSET = "Card Set";
    public static final String CARDSET_ROUTE = "tysc/cardset";
    public static final String CARD = "Card";
    public static final String CARD_ROUTE = "tysc/card";
    public static final String SPORT = "Sport";
    public static final String SPORT_ROUTE = "tysc/sport";
    public static final String TEAM = "Team";
    public static final String TEAM_ROUTE = "tysc/team";
    public static final String POSITION = "Position";
    public static final String POSITION_ROUTE = "tysc/position";
    public static final String PLAYER = "Player";
    public static final String PLAYER_ROUTE = "tysc/player";
    public static final String ROOSTER = "Rooster";
    public static final String ROOSTER_ROUTE = "tysc/rooster";

    public static RouterLink getSportLink() {
        return new RouterLink(SPORT, SportView.class);
    }

    public static RouterLink getTeamLink() {
        return new RouterLink(TEAM, TeamView.class);
    }

    public static RouterLink getPlayerLink() {
        return new RouterLink(PLAYER, PlayerView.class);
    }

    public static RouterLink getPositionLink() {
        return new RouterLink(POSITION, PositionView.class);
    }

    public static RouterLink getRoosterLink() {
        return new RouterLink(ROOSTER, RoosterView.class);
    }

    public static RouterLink getVendorLink() {
        return new RouterLink(VENDOR, VendorView.class);
    }

    public static RouterLink getCardSetLink() {
        return new RouterLink(CARDSET, CardSetView.class);
    }

    public static RouterLink getCardLink() {
        return new RouterLink(CARD, CardView.class);
    }

    public static SideNavItem getTyscNavigation() {
        SideNavItem tysc = new SideNavItem(TYSC, VENDOR_ROUTE, VaadinIcon.ARCHIVE.create());
        tysc.addItem(new SideNavItem(SPORT, SportView.class));
        tysc.addItem(new SideNavItem(TEAM, TeamView.class));
        tysc.addItem(new SideNavItem(PLAYER, PlayerView.class));
        tysc.addItem(new SideNavItem(POSITION, PositionView.class));
        tysc.addItem(new SideNavItem(ROOSTER, RoosterView.class));
        tysc.addItem(new SideNavItem(CARDSET, CardSetView.class));
        tysc.addItem(new SideNavItem(CARD, CardView.class));
	tysc.addItem(new SideNavItem(VENDOR, VendorView.class));
	return tysc;
    }

    private TyscConstants() {
        // private constructor to hide the implicit public one
    }
}
