public function isActive(EntityInterface $item)
    {
        if ($item->has('activation') && is_callable($item->get('activation'))) {
            $callable = $item->get('activation');

            return $callable($this->_View->request, $item);
        }

        $itemUrl = $this->sanitize($item->get('url'));
        if (!str_starts_with($itemUrl, '/')) {
            return false;
        }

        switch ($item->get('activation')) {
            case 'any':
                return $this->_requestMatches($item->get('active'));
            case 'none':
                return !$this->_requestMatches($item->get('active'));
            case 'php':
                return php_eval($item->get('active'), [
                    'view', &$this->_View,
                    'item', &$item,
                ]) === true;
            case 'auto':
            default:
                static $requestUri = null;
                static $requestUrl = null;

                if ($requestUri === null) {
                    $requestUri = urldecode(env('REQUEST_URI'));
                    $requestUrl = str_replace('//', '/', '/' . urldecode($this->_View->request->url) . '/');
                }

                $isInternal =
                    $itemUrl !== '/' &&
                    str_ends_with($itemUrl, str_replace_once($this->baseUrl(), '', $requestUri));
                $isIndex =
                    $itemUrl === '/' &&
                    $this->_View->request->isHome();
                $isExact =
                    str_replace('//', '/', "{$itemUrl}/") === $requestUrl ||
                    $itemUrl == $requestUri;

                if ($this->config('breadcrumbGuessing')) {
                    return ($isInternal || $isIndex || $isExact || in_array($itemUrl, $this->_crumbs()));
                }

                return ($isInternal || $isIndex || $isExact);
        }
    }