<template>
    <div class="navigation-area">
        <router-link class="navigation-area__item-container" v-for="navItem in navigation" v-bind:key="navItem.label" :to="navItem.path">
            <div class="navigation-area__item-container__link-container" >
                <div v-html="navItem.svg"></div>
                <h1>{{navItem.label}}</h1>
                <div class="navigation-area__item-container__link-container__add-button" v-if="navItem.label == 'Team'">
                    <router-link to="/team/add_new">
                        <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <rect width="40" height="40" rx="20" fill="#2683FF"/>
                            <path d="M25 18.977V21.046H20.9722V25H19.0046V21.046H15V18.977H19.0046V15H20.9722V18.977H25Z" fill="white"/>
                        </svg>
                    </router-link>
                </div>
            </div>
        </router-link>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import NAVIGATION_ITEMS from "@/utils/constants/navigationLinks";

@Component(
    { 
        data: function() {
            return {
                navigation: NAVIGATION_ITEMS
            }
        }
    }
)

export default class NavigationArea extends Vue {}
</script>

<style lang="scss">
    .navigation-area {
        position: fixed;
        width: 280px;
		height: 100%;
		left: 0;
		top: 10vh;
        background-color: #fff;
        padding-top: 3.5vh;

        &__item-container {
            height: 70px;
            padding-left: 60px;
            border-left: 3px solid transparent;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            &.router-link-active,
            &.router-link-exact-active,
            &:hover {
                border-left: 3px solid #2683FF;
                .svg path:not(.white) {
                    fill: #2683FF !important;
                }    
            }

            &__link-container {
                display: flex;
                flex-direction: row;
                justify-content: flex-start;
                align-items: center;
                h1 {
                    font-family: 'montserrat_medium';
                    font-size: 16px;
                    line-height: 23px;
                    color: #354049;
                    margin-left: 15px;; 
                }

                &__add-button {
                    margin-left: 4vw;
                    background-color: transparent;

                    &:hover {
                        svg {
                            border-radius: 50px;
                            box-shadow: 0px 4px 20px rgba(35, 121, 236, 0.4);
                        }
                    }
                }
            }
        }
    }
    
    a {
        text-decoration: none;
        outline: none;
    }

    @media screen and (max-width: 720px) {
        .navigation-area {
            width: 50px;

        &__item-container {
            padding-left: 12px;

            &__link-container {
                h1 {
                    display: none;
                }

                &__add-button {
                    display: none;
                }
            }
        }
        }
    }
</style>
