import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
import { tools } from '@src/store/Modules/tools'

import { date, useQuasar } from 'quasar'
import { useI18n } from 'vue-i18n'

import { costanti } from '@costanti'

export default defineComponent({
  name: 'CCurrencyValue',
  components: {},
  emits: ['changedParamValue'],
  props: {
    modelValue: {
      type: [String, Number],
      required: false,
      default: '',
    },
    small: {
      type: Boolean,
      default: false,
    },
    label: {
      type: String,
      required: false,
      default: '',
    },
    tips: {
      type: String,
      required: false,
      default: '',
    },
    before_str: {
      type: String,
      required: false,
      default: '',
    },
    strfido: {
      type: String,
      required: false,
      default: '',
    },
    readonly: {
      type: Boolean,
      required: false,
      default: false,
    },
    symbol: {
      type: String,
      required: true,
    },
    color: {
      type: String,
      required: false,
      default: '',
    },
    color_border: {
      type: String,
      required: false,
      default: '',
    },
    icon: {
      type: String,
      required: false,
      default: '',
    },
    valueextra: {
      type: String,
      required: false,
      default: '',
    },
    paramTypeAccount: {
      type: Number,
      required: false,
      default: 0,
    },
    myrecparam: {
      type: Object,
      required: false,
      default: null,
    },
    admin: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
  setup(props, { emit }) {
    const $q = useQuasar()
    const { t } = useI18n()

    const showingtooltip = ref(false)
    const showinghouse = ref(false)

    function created() {
      // created
    }

    onMounted(created)

    return {
      showingtooltip,
      showinghouse,
      t,
      tools,
      costanti,
    }
  },
})
