static XElement RenderMenu(Feature currentFeature, IEnumerable <AuthroziedFeatureInfo> items)
        {
            if (items.None())
            {
                return(null);
            }

            var rootMEnuId = Guid.NewGuid();

            if (currentFeature != null)
            {
                rootMEnuId = currentFeature.ID;
            }

            var ul = new XElement("ul", new XAttribute("class", "nav navbar-nav dropped-submenu"), new XAttribute("id", rootMEnuId));

            foreach (var item in items)
            {
                var feature = item.Feature;

                var li = new XElement("li",
                                      new XAttribute("id", feature.ID),
                                      new XAttribute("class",
                                                     string.Format("feature-menu-item{0}{1}",
                                                                   " active".OnlyWhen(feature == currentFeature),
                                                                   " d-none".OnlyWhen(item.Feature.Hide)))
                                      ).AddTo(ul);

                li.Add(new XAttribute("expand", currentFeature.IsAnyOf(feature.WithAllChildren())));

                if (feature.Parent != null)
                {
                    li.Add(new XAttribute("is-side-menu-child", "true"));
                    li.Add(new XAttribute("side-menu-parent", feature.Parent.ID));
                }
                else
                {
                    li.Add(new XAttribute("is-side-menu-child", "false"));
                }

                var link = new XElement("a",
                                        new XAttribute("href", item.AddQueryString()),
                                        new XAttribute("data-badgeurl", feature.GetBadgeUrl().OrEmpty()),
                                        new XAttribute("data-badge-optional", feature.IsBadgeOptional()),
                                        new XAttribute("data-service", (feature.Service?.Name).OrEmpty()),
                                        new XAttribute("class", "badge-number"),
                                        new XElement("i", string.Empty,
                                                     new XAttribute("class", $"{feature.Icon}"),
                                                     new XAttribute("aria-hidden", "true")),
                                        feature.Title
                                        ).AddTo(li);

                if (!item.IsDisabled && !feature.UseIframe)
                {
                    link.Add(new XAttribute("data-redirect", "ajax"));
                }

                var children = FeatureSecurityFilter.GetAuthorizedFeatures(Context.Current.User(), parent: feature);

                if (children.Any())
                {
                    li.Add(RenderMenu(currentFeature, children));
                }
            }

            return(ul);
        }