<!--
    Copyright © 2021 Adrien Agez <adrien.agez@pm.me>

    This file is part of Nexus Timers.

    Nexus Timers 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.

    Nexus Timers 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 Nexus Timers.  If not, see <https://www.gnu.org/licenses/>.
-->

<template>
  <div class="map-selector">
    <h1 class="map-selector__title">Battleground Selector</h1>
    <ul class="map-selector__map-list">
      <template v-for="(battleground, battlegroundId) in maps">
        <router-link :to="`/battleground/${battlegroundId}`">
          <li class="map-selector__map-list-item"><a>{{ battleground.name }}</a></li>
        </router-link>
      </template>
    </ul>
  </div>
</template>

<script type="text/javascript">
  import MAPS from '../gameInfos/battlegrounds'

  export default {
    name: 'BattlegroundSelector',
    data () {
      return {
        maps: MAPS
      }
    }
  }
</script>

<style lang="sass" scoped>
  .map-selector
    &__map-list
      list-style-type: none
      padding-left: 0
      &-item
        font-size: 1.4rem
        padding: 10px 0 10px 10px
        border-top: solid #5659aa 1px
        border-left: none
  a
    text-decoration: none
    color: inherit
</style>
