<script lang="ts" setup>
  import { defineProps } from 'vue'
  import { useAuth } from '@/composables/user/auth.ts'

  defineProps<{ money: any, classes?: any, prefix?: string }>()

  const { user } = useAuth()
</script>

<template>
  <VTooltip
    :disabled="user?.assigned_to_branch || money['converted'].currency == money['original'].currency"
    :text="money['converted'].formatted"
  >
    <template #activator="{ props }">
      <span :class="classes" v-bind="props">{{ prefix || '' }}{{ money["original"].formatted }}</span>
    </template>
  </VTooltip>
</template>
