<template>
  <div class="main">
    <user-profile />
    <div class="lines">
      <van-cell-group>
        <van-cell title="消息通知" is-link to="/tongzhi">
          <template #value>
            <van-badge max="99" :show-zero="false" position="" :content="unread_tongzhi_count"/>
          </template>
        </van-cell>
      </van-cell-group>
    </div>
    <div class="lines">
      <van-cell-group>
        <van-cell title="我的下属老师" is-link to="/supervisor/subsidiaries"></van-cell>
        <van-cell title="课时统计" is-link to="/supervisor/stats"></van-cell>
      </van-cell-group>
    </div>
    <div class="lines">
      <van-cell-group>
        <van-cell title="切换机构" is-link to="/org/select"></van-cell>
        <van-cell title="机构首页管理" is-link to="/org/homepage"></van-cell>
        <van-cell title="个性化设置" is-link to="/user-settings"></van-cell>
      </van-cell-group>
    </div>
  </div>
</template>

<script lang="ts">
import {defineComponent, computed} from 'vue'
import { CellGroup, Cell, Badge} from 'vant'
import UserProfile from '~/components/user-profile.vue'
import useUser from '~/store/user'

export default defineComponent({
  name: "supervisor-profile",
  components: {
    [Cell.name]: Cell,
    [CellGroup.name]: CellGroup,
    [Badge.name]: Badge,
    [UserProfile.name]: UserProfile
  },
  setup(){
    
    const {store} = useUser()

    const unread_tongzhi_count = computed(() => store.current.unread_tongzhi_count)


    return {unread_tongzhi_count}
  }

})
</script>

<style scoped lang="less">
.main {


}
</style>
