TicketSidebarWrapper.vue 726 B

12345678910111213141516171819202122232425262728293031
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import TicketSidebarButton from './TicketSidebarButton.vue'
  4. import type { TicketSidebarWrapperProps } from '../../types/sidebar.ts'
  5. defineProps<TicketSidebarWrapperProps>()
  6. defineEmits<{
  7. click: [string]
  8. }>()
  9. </script>
  10. <template>
  11. <div>
  12. <TicketSidebarButton
  13. :key="sidebar"
  14. :name="sidebar"
  15. :label="sidebarPlugin.title"
  16. :icon="sidebarPlugin.icon"
  17. :badge="badge"
  18. :selected="selected"
  19. :update-indicator="updateIndicator"
  20. @click="$emit('click', $event)"
  21. />
  22. <Teleport v-if="selected" to="#ticketSidebar">
  23. <slot />
  24. </Teleport>
  25. </div>
  26. </template>