<template lang="html">
  <UserTools v-if="isloggedin" />
  <Login v-bind:title="title" v-bind:form="form" v-else />
</template>

<script>
import { mapState, mapActions } from 'vuex'

import Login from 'vuejs/components/User/Login'
import UserTools from 'vuejs/components/User/UserTools'

export default {
  props: ['title', 'form'],
  computed: {
    ...mapState({
      isloggedin: state => state.User.isloggedin
    })
  },
  components: {
    Login,
    UserTools
  }
}

</script>

<style lang="css" scoped>

</style>
