<template>
  <div>
    <div class="row">
      <div :class="` `" :style="withBorder() ? `` : ``">
        <div
          v-if="
            title &&
            (type === costanti.FieldType.string ||
              type === costanti.FieldType.number)
          "
          class="q-ma-xs"
        >
          <q-field
            rounded
            outlined
            :bg-color="$q.dark.isActive ? '' : 'blue-4'"
            dense
            style="min-width: 110px"
          >
            <template v-slot:control>
              <div class="centermydiv">
                <div v-if="myimg" class="text-center">
                  <q-img
                    :src="myimg"
                    class="text-center"
                    style="height: 50px; width: 50px"
                    :alt="title"
                  >
                  </q-img>
                </div>
                <div
                  class="self-center full-width no-outline text-center"
                  tabindex="0"
                >
                  {{ title }}
                </div>
              </div>
            </template>
          </q-field>
        </div>

        <CMyPopupEdit
          :dense="dense"
          debounce="1000"
          :fielddb="true"
          v-bind="$attrs"
          :rec="rec"
          :isrec="!!rec"
          :table="table"
          :hint="title"
          :title="title"
          :visulabel="visulabel"
          :field="mykey"
          :showall="showall"
          :filter="filter"
          :subfield="mysubkey"
          :specialField="specialField"
          :mysubsubkey="mysubsubkey"
          :indrec="indrec"
          :type="type"
          :serv="serv"
          :disable="disable"
          :jointable="jointable"
          :myimg="myimg"
          :canModify="canModify && editOn"
          :canEdit="editOn"
          :id="id"
          :idmain="idmain"
          :mycol="col ? col : null"
          :tablesel="tablesel"
          :pickup="pickup"
          v-model:row="row"
          @showandsave="showandsave"
          @save="save"
          :path="path"
        >
        </CMyPopupEdit>
      </div>
    </div>
  </div>
</template>

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

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