<template>
  <CMyPage
    title="Configura Sito"
    imgbackground="images/calendario_eventi.jpg"
    sizes="max-height: 120px"
  >
    <div class="q-ma-sm q-gutter-sm q-pa-xs">
      <div v-if="mysite">
        <q-banner
          rounded
          class="bg-primary text-white"
          color="primary q-title"
          style="text-align: center"
        >
          <p class="mybanner">{{ mysite.name }}</p>
        </q-banner>

        <CMyFieldDb
          title="Attivo"
          table="sites"
          mykey="active"
          :id="mysite._id"
          :rec="mysite"
        >
        </CMyFieldDb>

        <CMyFieldDb
          title="Email Admin"
          table="sites"
          :id="mysite._id"
          :rec="mysite"
          mykey="adminemail"
          debounce="1000"
        >
        </CMyFieldDb>


        <CMyFieldDb
          title="Titolo"
          table="sites"
          :id="mysite._id"
          :rec="mysite"
          mykey="name"
          debounce="1000"
        >
        </CMyFieldDb>

        <CMyFieldDb
          title="Descrizione"
          debounce="1000"
          table="sites"
          :id="mysite._id"
          :rec="mysite"
          mykey="description"
        >
        </CMyFieldDb>

        <CMyFieldDb
          title="Parole Chiave"
          table="sites"
          :id="mysite._id"
          :rec="mysite"
          mykey="keywords"
          debounce="1000"
        >
        </CMyFieldDb>

        <CMyFieldDb
          title="Host"
          table="sites"
          :id="mysite._id"
          :rec="mysite"
          mykey="host"
          debounce="1000"
        >
        </CMyFieldDb>

        <CMyFieldDb
          title="Host Test"
          table="sites"
          :id="mysite._id"
          :rec="mysite"
          mykey="host_test"
          debounce="1000"
        >
        </CMyFieldDb>

        <CMyFieldRec
          title="Opzioni Sito"
          table="sites"
          :id="mysite._id"
          :rec="mysite"
          field="confsite.options"
          :canEdit="true"
          :canModify="true">
        </CMyFieldRec>

        <CMyFieldDb title="BOT Telegram"
                    mykey="TELEG_BOT_LINK"
                    :serv="false"
                    :type="costanti.FieldType.string">
        </CMyFieldDb>

        <CMyFieldDb
          title="Nome del BOT Telegram"
          mykey="TELEG_BOT_NAME"
          :serv="false"
          :type="costanti.FieldType.string"
          debounce="1000"
        >
        </CMyFieldDb>
        <CMyFieldDb
          title="BOT Telegram (per Test)"
          mykey="TELEG_BOT_LINK_TEST"
          :serv="false"
          debounce="1000"
          :type="costanti.FieldType.string"
        >
        </CMyFieldDb>
        <CMyFieldDb
          title="Chat di Supporto (Help)"
          mykey="TELEGRAM_SUPPORT"
          :serv="false"
          :type="costanti.FieldType.string"
          debounce="1000"
        >
        </CMyFieldDb>
        <CMyFieldDb
          title="Sito ONLINE"
          mykey="SITO_ONLINE"
          :serv="false"
          :type="costanti.FieldType.boolean"
          debounce="1000"
        >
        </CMyFieldDb>

      </div>
    </div>
  </CMyPage>
</template>
<script lang="ts" src="./confsite.ts">
</script>
<style lang="scss" scoped>
@import 'confsite.scss';
</style>
