<?php
// =============================================================================
// modules/iboultra/module.php — IBO Ultra module manifest.
//
// All IBO Ultra page files currently live at the panel root for backward
// compatibility. The hrefs below are bare filenames; <base href> in
// page_header.php resolves them to the panel base URL.
// =============================================================================

$me_role = function_exists('auth_user') ? ((auth_user()['role'] ?? '') ?: '') : '';

$ibo_pages = [
    ['key' => 'services_clients',   'href' => 'services_clients.php',    'label' => 'Services & Clients'],
    ['key' => 'configuration',      'href' => 'app_config.php',          'label' => 'Configuration'],
    ['key' => 'languages',          'href' => 'languages.php',           'label' => 'Languages'],
    ['key' => 'vpn',                'href' => 'vpn.php',                 'label' => 'VPN'],
    ['key' => 'quick_url_encrypt',  'href' => 'quick_url_encrypt.php',   'label' => 'Quick URL Encrypt'],
];

$webview_pages = [
    ['key' => 'tmdb_settings',      'href' => 'tmdb_settings.php',       'label' => 'TMDB Settings'],
    ['key' => 'tmdb_layouts',       'href' => 'tmdb_layouts.php',        'label' => 'TMDB Layouts'],
    ['key' => 'slideshow_settings', 'href' => 'slideshow_settings.php',  'label' => 'Media Slideshow'],
    ['key' => 'frameview_settings', 'href' => 'frameview_settings.php',  'label' => 'Framed View'],
    ['key' => 'sports_settings',    'href' => 'sports_settings.php',     'label' => 'Sports Guide'],
];

return [
    'id'      => 'iboultra',
    'label'   => 'IBO Ultra',
    'enabled' => true,
    'sort'    => 20,
    'sidebar' => [
        [
            'section' => 'OTT Applications',
            'parent'  => [
                'label' => 'IBO Ultra',
                'icon'  => 'ph-television-simple',
                'image' => 'iboultra.png',
            ],
            'pages'   => $ibo_pages,
        ],
        [
            'section' => 'Android WebViews',
            'parent'  => [
                'label' => 'WebViews',
                'icon'  => 'ph-monitor-play',
                'image' => 'webview.png',
            ],
            'pages'   => $webview_pages,
        ],
    ],
];
