<?php

namespace Tricks\Dashboard;

use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Laravel\Nova\Dashboards\Main as BaseDashboard;
use Tricks\NovaPhpInformationCard\NovaPhpInformationCard;

class Main extends BaseDashboard
{
    public function name(): string
    {
        return 'Start';
    }

    public function cards(): array
    {
        return [
            new Dashboard,
            (new NovaPhpInformationCard)->canSee(fn(Request $request) => Str::endsWith(
                $request->user()?->email, ['@tricks.de', '@mukutu.de'])),
        ];
    }
}
