<?php

declare(strict_types=1);

namespace PpPhp\Core\Designer\Layouts\Layouts;

use PpPhp\Core\Designer\DesignerComponent as C;
use PpPhp\Core\Designer\Layouts\DesignerLayoutInterface;

class TwoColumnLayout implements DesignerLayoutInterface
{
    public static function id(): string
    {
        return 'two_column';
    }

    public static function name(): string
    {
        return 'Two Columns';
    }

    public static function description(): string
    {
        return 'Two equal-width columns.';
    }

    public static function icon(): string
    {
        return 'layout-split';
    }

    public static function category(): string
    {
        return 'Basic';
    }

    public static function columns(): int
    {
        return 2;
    }

    public static function components(): array
    {
        return [
            C::make('two_column_row', 'row', 'Two Column Row', [
                'columns' => 2,
                'cells' => [
                    [
                        'id' => 'two_column_left',
                        'span' => 6,
                        'components' => [],
                        'style' => C::style(),
                    ],
                    [
                        'id' => 'two_column_right',
                        'span' => 6,
                        'components' => [],
                        'style' => C::style(),
                    ],
                ],
            ]),
        ];
    }
}
