let lastOpenedType = null; let isAnimating = false; function animateOpen(ausklappBox) { ausklappBox.style.maxHeight = '0px'; ausklappBox.classList.add('open'); ausklappBox.style.opacity = '1'; // Höhe messen const scrollHeight = ausklappBox.scrollHeight; // Im nächsten Frame auf die echte Höhe animieren requestAnimationFrame(() => { ausklappBox.style.maxHeight = scrollHeight + 'px'; }); } function animateClose(ausklappBox, callback) { // Höhe auf aktuellen Wert setzen, dann auf 0 animieren ausklappBox.style.maxHeight = ausklappBox.scrollHeight + 'px'; requestAnimationFrame(() => { ausklappBox.style.maxHeight = '0px'; ausklappBox.style.opacity = '0'; }); ausklappBox.addEventListener('transitionend', function handler(e) { if (e.propertyName === 'max-height') { ausklappBox.classList.remove('open'); ausklappBox.removeEventListener('transitionend', handler); if (callback) callback(); } }); } function getBoxHtml(type) { if (type === 'ausdruck') { return `
Datei auswählen oder hier ablegen (PDF, JPG, PNG)
Foto oder Scan des Rezepts hochladen (PDF, JPG, PNG)
Einfach, sicher und schnell: Nutzen Sie Ihre elektronische Gesundheitskarte
und lösen Sie Ihr E-Rezept direkt über unsere App ein.