<?php

namespace kernel\app_modules\view;

use kernel\helpers\Debug;
use kernel\Module;
use kernel\modules\menu\service\MenuService;

class ViewModule extends Module
{

    public MenuService $menuService;
    public function __construct()
    {
        $this->menuService = new MenuService();
    }

    public function init(): void
    {
        $this->menuService->createItem([
            "label" => "Просмотры",
            "url" => "/admin/view",
            "slug" => "view",
        ]);
    }

    public function deactivate(): void
    {
        $this->menuService->removeItemBySlug("view");
    }
}