<?php
use function App\Core\e;

$audio = (string) ($audio ?? '');
?>
<div class="audio-preview-card <?= $audio !== '' ? 'is-ready' : '' ?>" data-audio-preview>
    <div class="audio-preview-meta">
        <strong data-audio-name><?= $audio !== '' ? e(basename($audio)) : 'Audio dosyasi secilmedi' ?></strong>
        <span data-audio-details><?= $audio !== '' ? e($audio) : 'MP3, WAV, OGG, M4A' ?></span>
    </div>
    <audio controls preload="metadata" <?= $audio !== '' ? 'src="' . e($audio) . '"' : '' ?> data-audio-player></audio>
    <div class="audio-preview-actions">
        <button class="pill" type="button" data-clear-audio>Dosyayı kaldır</button>
    </div>
</div>
