<template>
  <section class="AppAccountRole">
    <add-account-role v-if="showDetail"/>
    <account-role-list v-else/>
  </section>
</template>

<script>
import AddAccountRole from "./addAccountRole";
import AccountRoleList from "./accountRoleList";

export default {
  name: "AppAccountRole",
  props: {
    instance: Function
  },
  components: {AccountRoleList, AddAccountRole},
  computed: {
    showDetail() {
      return this.$route.hash == "#add"
    }
  },
  provide() {
    let {instance} = this
    return {instance}
  }
}
</script>

<style lang="scss" scoped>
.AppAccountRole {
}
</style>
