import Vue from 'vue';
import { copyToClipboard as quasarCopy } from 'quasar';

export default function copyToClipboard(
  text: string,
  toDisplay: (text: string) => string = (text) => `${text} скопирован`
): void {
  quasarCopy(text);
  Vue.prototype.$q.notify({
    message: toDisplay(text),
  });
}
