<script setup>

import { copyToClipboard } from '../utils';
import Button from './Button.vue';

const props = defineProps({
  value: String,
  doneHint: String,
});

function onClipboard() {
  copyToClipboard(props.value);
  window.pankow.notify({
    text: props.doneHint || 'Copied',
    type: 'success',
  });
}

</script>

<template>
  <Button class="pankow-clipboard-button" secondary icon="fa-solid fa-copy" tool @click="onClipboard()" style=""></Button>
</template>

<style>

.pankow-clipboard-button {
  padding: var(--pankow-input-vertial-padding);
}

</style>
