<template>
    <v-navigation-drawer
            absolute
            temporary
            v-model="$store.state.sideMenu"
    >
        <v-list>
            <v-list-item>

                <v-list-item-content>
                    <v-list-item-title>Keks Account</v-list-item-title>
                </v-list-item-content>
            </v-list-item>

            <v-divider></v-divider>

            <v-list-item
                    link
                    :to="{path: '/login'}"
                    v-if="!this.$store.state.loggedIn"
            >
                <v-list-item-icon>
                    <v-icon>mdi-login</v-icon>
                </v-list-item-icon>

                <v-list-item-content>
                    <v-list-item-title>Login</v-list-item-title>
                </v-list-item-content>
            </v-list-item>

            <v-list-item
                    link
                    :to="{path: '/invited'}"
                    v-if="!this.$store.state.loggedIn && this.$store.getters.getSettingValue('invites')"
            >
                <v-list-item-icon>
                    <v-icon>mdi-account-plus</v-icon>
                </v-list-item-icon>

                <v-list-item-content>
                    <v-list-item-title>Invited</v-list-item-title>
                </v-list-item-content>
            </v-list-item>

            <v-list-item
                    link
                    :to="{path: '/register'}"
                    v-if="!this.$store.state.loggedIn && this.$store.getters.getSettingValue('registration_possible')"
            >
                <v-list-item-icon>
                    <v-icon>mdi-account-plus</v-icon>
                </v-list-item-icon>

                <v-list-item-content>
                    <v-list-item-title>Register</v-list-item-title>
                </v-list-item-content>
            </v-list-item>

            <v-list-item
                    link
                    v-if="this.$store.state.loggedIn"
                    :to="{path: '/dashboard'}"
            >
                <v-list-item-icon>
                    <v-icon>mdi-view-dashboard</v-icon>
                </v-list-item-icon>

                <v-list-item-content>
                    <v-list-item-title>Dashboard</v-list-item-title>
                </v-list-item-content>
            </v-list-item>

            <v-list-item
                    link
                    v-if="this.$store.state.loggedIn && this.$store.getters.getMe.developer"
                    :to="{path: '/apps'}"
            >
                <v-list-item-icon>
                    <v-icon>mdi-code-tags</v-icon>
                </v-list-item-icon>

                <v-list-item-content>
                    <v-list-item-title>Developer</v-list-item-title>
                </v-list-item-content>
            </v-list-item>

            <v-list-group
                    no-action
                    v-if="this.$store.state.loggedIn"
            >
                <template v-slot:activator>
                        <v-list-item-icon>
                            <v-icon>mdi-account</v-icon>
                        </v-list-item-icon>

                        <v-list-item-content>
                            <v-list-item-title>Kekskurse</v-list-item-title>
                        </v-list-item-content>
                </template>

                <v-list-item
                        link
                        :to="{path: '/profile'}"
                >
                    <v-list-item-content>
                        <v-list-item-title>Profile</v-list-item-title>
                    </v-list-item-content>
                </v-list-item>
                <v-list-item
                        link
                        :to="{path: '/access'}"
                >
                    <v-list-item-content>
                        <v-list-item-title>App Access</v-list-item-title>
                    </v-list-item-content>
                </v-list-item>
                <v-list-item
                        link
                        :to="{path: '/logout'}"
                >
                    <v-list-item-content>
                        <v-list-item-title>Logout</v-list-item-title>
                    </v-list-item-content>
                </v-list-item>
            </v-list-group>

            <v-list-group
                    no-action
                    v-if="this.$store.state.loggedIn && this.$store.getters.getMe.admin"
            >
                <template v-slot:activator>
                    <v-list-item-icon>
                        <v-icon>mdi-account-badge</v-icon>
                    </v-list-item-icon>

                    <v-list-item-content>
                        <v-list-item-title>Admin</v-list-item-title>
                    </v-list-item-content>
                </template>

                <v-list-item
                        link
                        :to="{path: '/admin/settings'}"
                >
                    <v-list-item-content>
                        <v-list-item-title>Settings</v-list-item-title>
                    </v-list-item-content>
                </v-list-item>
                <v-list-item
                        link
                        :to="{path: '/admin/user'}"
                >
                    <v-list-item-content>
                        <v-list-item-title>Users</v-list-item-title>
                    </v-list-item-content>
                </v-list-item>
                <v-list-item
                        link
                        :to="{path: '/admin/app'}"
                >
                    <v-list-item-content>
                        <v-list-item-title>Apps</v-list-item-title>
                    </v-list-item-content>
                </v-list-item>
                <v-list-item
                        link
                        :to="{path: '/admin/invite'}"
                >
                    <v-list-item-content>
                        <v-list-item-title>Invites</v-list-item-title>
                    </v-list-item-content>
                </v-list-item>
            </v-list-group>


        </v-list>
    </v-navigation-drawer>
</template>

<script>

    export default {
        name: 'MenuMobile',
        components: {
        },
        data () {
            return {
            }
        },
        computed: {
        },
        methods: {

        },
        mounted: function () {

        }
    }
</script>
