<script setup lang="ts">
  import { ref } from '../../../../adapter-vue'
  import custom from '../../../../assets/icon/live-stream.svg'
  import ToolbarItemContainer from '../toolbar-item-container/index.vue'
  import { isUniFrameWork } from '../../../../utils/env'
  import { navigateTo } from '../../../../../utils/router'

  const evaluateIcon = custom

  const container = ref()
  const onDialogShow = () => {
    navigateTo(
      '/TUIKit/components/TUIChat/message-input-toolbar/live-stream/apply'
    )
    container?.value?.toggleDialogDisplay(false)
  }
</script>

<template>
  <ToolbarItemContainer
    ref="container"
    :iconFile="evaluateIcon"
    :iconWidth="isUniFrameWork ? '34px' : '20px'"
    :iconHeight="isUniFrameWork ? '34px' : '20px'"
    title="直播"
    @onDialogShow="onDialogShow"
  ></ToolbarItemContainer>
</template>

<style scoped lang="scss"></style>
