<?php

declare(strict_types=1);

namespace PpPhp\Core\Designer\Layouts;

class LayoutFactory
{
    public static function make(string $layoutId): array
    {
        $layout = DesignerLayoutRegistry::find($layoutId);

        if ($layout === null) {
            return [];
        }

        return $layout::components();
    }

    public static function metadata(): array
    {
        return DesignerLayoutRegistry::metadata();
    }
}
