<?php
/**
 * @var \App\Customization $customization
 * @var \App\Assets $assets
 * @var array $metrics
 * @var array $stations
 * @var array $admin_panels
 * @var bool $show_admin
 */

$this->layout('main', ['title' => __('Dashboard'), 'manual' => true]);

$props = [
    'avatar' => $avatar,
    'avatarServiceName' => $avatarServiceName,
    'avatarServiceUrl' => $avatarServiceUrl,
    'userName' => $user->getName() ?? __('AzuraCast User'),
    'userEmail' => $user->getEmail(),
    'profileUrl' => (string)$router->named('profile:index'),
    'adminUrl' => (string)$router->named('admin:index:index'),
    'showAdmin' => $showAdmin,
    'notificationsUrl' => (string)$router->named('api:frontend:dashboard:notifications'),
    'showCharts' => $showCharts,
    'chartsUrl' => (string)$router->named('api:frontend:dashboard:charts'),
    'addStationUrl' => (string)$router->named('admin:stations:add'),
    'stationsUrl' => (string)$router->named('api:frontend:dashboard:stations'),
];

$assets
    ->addInlineJs($this->fetch('partials/radio_controls.js'), 95)
    ->addVueRender('Vue_Dashboard', '#dashboard', $props);
?>

<div id="dashboard"></div>
