import { ref } from 'vue'
import { getStore, setStore } from '@/utils/storage'

export default () => {
  const deptTooltipVisible = ref(false)
  if (getStore('dept_tooltip_visible') !== true) {
    setTimeout(() => {
      deptTooltipVisible.value = true
      setTimeout(() => {
        deptTooltipVisible.value = false
      }, 3000)
    }, 1000)
  }
  const handleCloseDeptTooltip = () => {
    setStore('dept_tooltip_visible', true)
  }
  return {
    deptTooltipVisible,
    handleCloseDeptTooltip
  }
}
