<?php


namespace ModulesGarden\ProxmoxAddon\App\Http\Admin;


use ModulesGarden\ProxmoxAddon\App\UI\CloudInitScriptCreate\Pages\CloudInitScriptContainter;
use ModulesGarden\ProxmoxAddon\App\UI\CloudInitScript\Pages\CloudInitScriptDataTable;
use ModulesGarden\ProxmoxAddon\Core\Http\AbstractController;
use function ModulesGarden\ProxmoxAddon\Core\Helper\view;

class CloudInitScript extends AbstractController
{

    /**
     * Example of static page
     * @return type
     */
    public function index()
    {
        return view()->addElement(CloudInitScriptDataTable::class);
    }

    public function create()
    {
        return $this->update();
    }

    public function update()
    {
        return view()->setCustomJsCode()->addElement(CloudInitScriptContainter::class);
    }
}