<template>
  <div v-if="myrecparam">
    <CCurrencyValue
      :symbol="symbol"
      :color="color"
      :color_border="color_border"
      v-model="myvalue"
      :icon="icon"
      :label="label"
      :tips="tips"
      :paramTypeAccount="paramTypeAccount"
      :myrecparam="myrecparam"
      @changedParamValue="changedParamValue"
      :admin="admin"
    >
    </CCurrencyValue>
  </div>
  <q-dialog v-model="changeParamValue">
    <q-card class="dialog_card">
      <q-toolbar class="bg-primary text-white">
        <q-toolbar-title class="text-h7">
          {{ $t('account.settings') }}
        </q-toolbar-title>
        <q-btn flat round color="white" icon="close" v-close-popup></q-btn>
      </q-toolbar>
      <q-card-section class="inset-shadow">
        <CMyFieldDb
          v-if="myrecparam"
          table="accounts"
          :title="tools.getStrByParamTypeAccount(paramTypeAccount)"
          :id="myrecparam._id"
          :rec="myrecparam"
          :mykey="tools.getFieldByParamTypeAccount(paramTypeAccount)"
          :type="tools.getTypeByParamTypeAccount(paramTypeAccount)"
          @save="save"
        />
      </q-card-section>
    </q-card>
  </q-dialog>
</template>

<script lang="ts" src="./CCurrencyV2.ts">
</script>

<style lang="scss" scoped>
@import './CCurrencyV2.scss';
</style>
