import { tools } from '../../store/Modules/tools'
import { useQuasar } from 'quasar'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'CCopyBtn',
  props: {
    texttocopy: {
      type: String,
      required: true,
    },
    title: {
      type: String,
      required: false,
      default: '',
    },
    small: {
      type: Boolean,
      required: false,
      default: false,
    }
  },
  components: {},
  setup(props) {
    const $q = useQuasar()

    function copytoclip() {
      tools.copyStringToClipboard($q, props.texttocopy, true)
    }

    function getclass() {
      if (props.small) {
        return 'text-h7'
      } else {
        return 'text-h5'
      }
    }

    return {
      copytoclip,
      tools,
      getclass,
    }
  },
})
