<?php

declare(strict_types=1);

namespace PpPhp\Core\Designer\Presets;

class DashboardPresetFactory
{
    public static function make(string $presetId): array
    {
        $preset = DesignerPresetRegistry::find('dashboard', $presetId);

        if ($preset === null) {
            $preset = DesignerPresetRegistry::find('dashboard', 'executive');
        }

        return $preset ? $preset::components() : [];
    }
}