<?php
declare(strict_types=1);

namespace PpPhp\Core\Designer\Layout;

final class DesignerLayoutTemplate
{
    public static function fromName(string $name, string $rowId = 'row_1'): DesignerGridRow
    {
        return match ($name) {
            'two', 'two_columns', '2' => DesignerGridRow::create($rowId, [6, 6]),
            'three', 'three_columns', '3' => DesignerGridRow::create($rowId, [4, 4, 4]),
            'four', 'four_columns', '4' => DesignerGridRow::create($rowId, [3, 3, 3, 3]),
            'sidebar_left' => DesignerGridRow::create($rowId, [3, 9]),
            'sidebar_right' => DesignerGridRow::create($rowId, [9, 3]),
            default => DesignerGridRow::create($rowId, [12]),
        };
    }
}
