<template>
  <span>{{ formattedValue }}</span>
</template>
<script>
  export default {
    props: {
      value: {
        type: Number,
        required: true
      },
      locale: {
        type: String,
        default: 'es-CO',
      },
      currency: {
        type: String,
        default: 'COP',
      },
    },
    computed: {
      formattedValue() {
        return new Intl.NumberFormat(this.locale, { style: 'currency', currency: this.currency }).format(this.value);
      },
    },
  }
</script>
