import {
  Access,
  State
} from '@/constant'

export default {
  computed: {
    canEdit () {
      return this.accessSet.has(Access.MANAGE_CALENDAR)
    }
  },
  render (h) {
    const canEdit = this.canEdit
    return h(canEdit ? 'Designer' : 'Viewer', {
      props: {
        ...this.$attrs,
        status: canEdit ? State.READY : State.RESOLVED
      }
    })
  }
}
