<template>
  <div class="row justify-evenly items-center q-pa-sm q-ma-sm">
    <div >
      <q-btn
        v-if="
          userStore.showButtonSendCoin(myuser) &&
          (myuser.username !== userStore.my.username ||
            userStore.hoContiCollettiviDaAmministrare() ||
            userStore.hoContiComunitariDaAmministrare())
        "
        icon="fas fa-coins"
        color="green"
        size="md"
        rounded
        :label="$t('circuit.sendcoins')"
        @click="clickOpenSendCoin"
      >
      </q-btn>
    </div>
    <div
      v-if="showBtnActivities"
      
    >
      <q-btn
        v-if="site.confpages && site.confpages.showCompetenze"
        icon="fas fa-house-user"
        size="md"
        color="orange"
        :label="$t('profile.myactivities')"
        :to="`/attivita/` + myuser.username"
      >
      </q-btn>
    </div>
    <div class="q-ma-sm">
      <q-btn
        v-if="getLinkUserTelegram()"
        icon="fab fa-telegram"
        color="blue"
        :type="tools.isUserOk() ? 'a' : 'btn'"
        size="md"
        rounded
        :label="$t('dialog.contact')"
        :href="tools.isUserOk() ? getLinkUserTelegram() : null"
        @click="!tools.isUserOk() ? (showingtooltip = !showingtooltip) : false"
        target="__blank"
      >
      </q-btn>
      <div v-else-if="myuser.email" class="row q-ma-sx">
        <CLabel
          v-bind="$attrs"
          :copy="true"
          :value="tools.isUserOk() ? myuser.email : ''"
          :label="$t('reg.email')"
        />

        <q-btn
          outline
          icon="fas fa-envelope"
          :color="$q.dark.isActive ? `shite` : `black`"
          :type="tools.isUserOk() ? 'a' : 'btn'"
          size="md"
          :label="$t('msgs.send_email')"
          :href="tools.isUserOk() ? tools.getemailto(myuser.email) : null"
          @click="
            !tools.isUserOk() ? (showingtooltip = !showingtooltip) : false
          "
          target="__blank"
        >
        </q-btn>
      </div>
    </div>
  </div>
  <div v-if="showsendCoinTo || sendRIS > 0">
    <CSendCoins
      :showprop="showsendCoinTo"
      :to_user="myuser"
      :sendRIS="sendRIS"
      @close="showsendCoinTo = false"
    >
    </CSendCoins>
  </div>
</template>

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

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