import * as bootstrap from 'bootstrap';
import $ from 'jquery';

$('.button-resend').on('click', function() {
    $(this).prop('disabled', true);
    $(this).closest('form').submit();
});

function copyToClipboard(): void {
    const downloadLinkElement = document.getElementById('downloadLink');

    if (downloadLinkElement) {
        const textToCopy = downloadLinkElement.innerText.trim();

        // Создаем временный элемент <textarea> для копирования
        const textarea = document.createElement('textarea');
        textarea.value = textToCopy;
        document.body.appendChild(textarea);
        textarea.select();
        document.execCommand('copy');
        document.body.removeChild(textarea);
    }
}
document.addEventListener('DOMContentLoaded', () => {
    const copyIcon = document.getElementById('copyIcon');
    if (copyIcon) {
        copyIcon.addEventListener('click', copyToClipboard);
    }
});
