@extends('layouts.nova')

@push('head')
    @vite(['resources/js/dashboard/index.jsx'])
@endpush

@section('main-class', 'pt-20')

@section('content')
    <div
        id="dashboard-root"
        data-username="{{ $dashboard_user_name }}"
        data-is-creator="{{ $dashboard_is_creator ? '1' : '0' }}"
        data-level="{{ $dashboard_level ?? 1 }}"
        data-rank="{{ $dashboard_rank ?? 'Newbie' }}"
        data-received-comments-count="{{ (int) ($dashboard_received_comments_count ?? 0) }}"
        data-overview='@json($dashboard_overview ?? [])'
        data-preferences='@json($dashboard_preferences ?? [])'
    ></div>

    @if (session('status'))
        <div class="mx-auto max-w-7xl px-4 mt-4">
            <div class="rounded-lg border border-emerald-500/30 bg-emerald-900/20 px-4 py-3 text-sm text-emerald-100" role="status">
                {{ session('status') }}
            </div>
        </div>
    @endif
@endsection
