<?php

declare(strict_types=1);

namespace Apexl\Io\UserTabulator\Dtos;

use Apexl\Dto\Dto;
use Apexl\Io\UserLayout\Interfaces\UserLayoutDtoInterface;
use Arrayy\Type\StringCollection;

final readonly class TabulatorLayoutDto extends Dto implements UserLayoutDtoInterface
{
    public function __construct(public StringCollection $columns) {}

    public static function fromColumnsArray(array $columns): self
    {
        return new self(StringCollection::createFromArray($columns));
    }
}
