export function initCopyUrl() {
    const btn = document.getElementById('copy-url-btn')
    if (!btn) return
    const url = document.getElementById('event-url')?.textContent?.trim()
    if (!url) return

    btn.addEventListener('click', () => {
        globalThis.navigator.clipboard.writeText(url).then(() => {
            btn.textContent = 'Copie !'
            setTimeout(() => { btn.textContent = 'Copier le lien' }, 2000)
        })
    })
}
