<?php

namespace App\Admin\Controllers;

use App\Admin\Metrics\Examples;
use App\Http\Controllers\Controller;
use Dcat\Admin\Http\Controllers\Dashboard;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;

class HomeController extends Controller
{
    public function index(Content $content)
    {
        return $content
            ->header(trans('admin-home.Data_panel'))
            ->description('')
            ->body(function (Row $row) {
                $row->column(6, function (Column $column) {
                    $column->row(new Examples\NewUsers());
                    $column->row(new Examples\Games());
                });
                $row->column(6, function (Column $column) {
                    $column->row(function (Row $row) {
                        $row->column(6, new Examples\TotalGames());
                        $row->column(6, new Examples\TotalUsers());
                    });
                    $column->row(function (Row $row) {
                        $row->column(6, new Examples\TotalTeam());
                        $row->column(6, new Examples\TotalCourse());
                    });
                    $column->row(function (Row $row) {
                        $row->column(6, new Examples\Report());
                        $row->column(6, new Examples\Feedback());
                    });
                });
            });
    }
}
