<?php

namespace Plainwork\Ui\Component;

final class Main
{
    public $title;
    public $content;

    public Menu $mainMenu;
    public Menu $titleMenu;
    public Menu $menu;
    public Menu $afterContentMenu;
    public Menu $bottomMenu;

    private array $css = [];
    private array $js = [];

    public function __construct($content = null)
    {
        $this->content = $content;
        $this->mainMenu = new Menu();
        $this->titleMenu = new Menu();
        $this->menu = new Menu();
        $this->bottomMenu = new Menu();
        $this->afterContentMenu = new Menu();
    }

    public function getContent()
    {
        return $this->content;
    }

    public function setContent($content): self
    {
        $this->content = $content;

        return $this;
    }

    public function withCss($file): self
    {
        $this->css[] = $file;

        return $this;
    }

    public function getCss(): array
    {
        return $this->css;
    }

    public function withJs($file): self
    {
        $this->js[] = $file;

        return $this;
    }

    public function getJs(): array
    {
        return $this->js;
    }

    // public function render()
    // {
        // return $this->content;
    // }
}
