<?php

declare(strict_types=1);

use PpPhp\Core\Platform\Metadata\Builders\MetadataBuilder;
use PpPhp\Core\Platform\Metadata\ValueObjects\PlatformCategory;
use PpPhp\Core\Platform\Metadata\ValueObjects\PlatformTag;
use PpPhp\Core\Platform\Metadata\ValueObjects\PlatformVersionInfo;

require_once dirname(__DIR__, 5) . '/core/Autoloader.php';

$metadata = MetadataBuilder::create()
    ->name('Dashboard Widget')
    ->description('A reusable widget for PPphp Designer dashboards.')
    ->category(PlatformCategory::WIDGET)
    ->icon('speedometer2')
    ->author('PPphp Team')
    ->version(new PlatformVersionInfo('1.0.0', '2.0.0'))
    ->addTag(new PlatformTag('dashboard'))
    ->addTag(new PlatformTag('analytics'))
    ->build();

header('Content-Type: application/json');
echo json_encode($metadata->toArray(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
