<?php
use function App\Core\{e, logo_asset, url};

$section = $section ?? '';
$logoAsset = logo_asset('studio');
$links = [
    ['dashboard', '/studyo', 'Genel Bakis'],
    ['modlarim', '/studyo/modlarim', 'Modlarim'],
    ['mod-yukle', '/studyo/mod-yukle', 'Mod Yukle'],
    ['muziklerim', '/studyo/muziklerim', 'Muziklerim'],
    ['muzik-yukle', '/studyo/muzik-yukle', 'Muzik Yukle'],
    ['artist', '/studyo/artist', 'Artist Connect'],
    ['profilim', '/studyo/profilim', 'Profilim'],
    ['arkadaslar', '/studyo/arkadaslar', 'Arkadaslar'],
    ['mesajlar', '/studyo/mesajlar', 'Mesajlar'],
    ['abonelikler', '/studyo/abonelikler', 'Abonelik'],
    ['kazanclarim', '/studyo/kazanclarim', 'Kazanclarim'],
    ['para-cek', '/studyo/para-cek', 'Para Cek'],
    ['bilgilerim', '/studyo/bilgilerim', 'Banka Bilgilerim'],
    ['ayarlar', '/studyo/ayarlar', 'Ayarlar'],
];
?>
<aside class="side studio-side" data-studio-sidebar>
    <div class="studio-side-head">
        <a class="side-logo" href="<?= url('/studyo') ?>" aria-label="Zalorox Studio">
            <?php if ($logoAsset): ?>
                <img src="<?= url($logoAsset) ?>" alt="Zalorox" loading="eager">
            <?php else: ?>
                <span>Zalorox</span>
            <?php endif; ?>
        </a>
        <button class="studio-side-toggle" type="button" data-studio-sidebar-toggle aria-expanded="false" aria-label="Studio menusunu ac">
            <span></span>
            <span></span>
            <span></span>
        </button>
    </div>
    <nav class="studio-side-menu" data-studio-sidebar-menu>
        <?php foreach ($links as [$key, $href, $label]): ?>
            <a class="<?= $section === $key ? 'is-active' : '' ?>" href="<?= url($href) ?>"><?= e($label) ?></a>
        <?php endforeach; ?>
        <div class="side-utility-links">
            <a class="side-return-link" href="<?= url('/') ?>">
                <span aria-hidden="true">&#8592;</span>
                <strong>Siteye Don</strong>
            </a>
        </div>
    </nav>
</aside>
