<?php if (statusModule('publish', 'top-music') == 1) { ?>
    <?php $topMusic = topMusic();
    if ($topMusic) {
        $countTopM = 0; ?>
        <div class="mb-4 col-md-<?php echo $widget->col; ?>">
            <h2 class="title"><?php echo $_LANG['top-music']; ?></h2>

            <?php foreach ($topMusic as $topM) {
                $countTopM++; ?>
                <div class="card top-music-card">
                    <div class="card-body">
                        <span class="num"><?php echo $countTopM; ?></span>
                        <div class="avatar">
                            <button class="b-play" aria-label="<?php echo $_LANG['play_music']; ?>" <?php echo getTopMusicAudio($topM->type, $topM->audio_url); ?>></button>
                            <img loading="lazy" src="<?php echo PATH_SYSTEM . "public/music/" . $topM->thumbnail; ?>" class="rounded-circle" alt="<?php echo $topM->artist; ?>">
                        </div>
                        <div class="info">
                            <span class="track"><?php echo $topM->track; ?></span>
                            <span class="artist"><?php echo $topM->artist; ?></span>
                        </div>
                    </div>
                </div>
            <?php } ?>
        </div>
    <?php } ?>
<?php } ?>
