<?php

namespace kernel\modules\post;

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

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

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

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