<?phpnamespace App\View;/** What a tab shows: a property sheet, a table, graphs, the home page or a text; and the buttons over it. */final class Page{ /** @param list<array{id: string, text: string, enabled?: bool, style?: string}> $actions */ public function __construct( public string $kind, public array $sections = [], public array $columns = [], public array $rows = [], public array $actions = [], public string $text = '', public string $empty = '', /** @var list<array{title: string, format: string, max?: float|null, series: list<array<string, mixed>>}> */ public array $charts = [], ) { } public static function sheet(array $sections, array $actions = []): self { return new self('sheet', $sections, [], [], $actions); } public static function grid(array $columns, array $rows, array $actions = [], string $empty = ''): self { return new self('grid', [], $columns, $rows, $actions, '', $empty); } public static function text(string $text, array $actions = []): self { return new self('text', [], [], [], $actions, $text); }}