<?php

declare(strict_types=1);

namespace App\Filament\Concerns;

/**
 * 集成中心菜单组：由 config('dberp.integration.nav_enabled') 控制侧栏与访问入口。
 */
trait HidesDberpIntegrationCenterNavigation
{
    protected static function integrationCenterNavEnabled(): bool
    {
        return (bool) config('dberp.integration.nav_enabled', false);
    }

    public static function shouldRegisterNavigation(): bool
    {
        return static::integrationCenterNavEnabled();
    }

    protected static function canAccessIntegrationCenter(): bool
    {
        return static::integrationCenterNavEnabled();
    }
}
