// <auto-generated />
#nullable enable
namespace ThingsGateway.Gateway.Razor
{
    public static class TreeViewItemMapper
    {
        public static global::System.Collections.Generic.List<global::BootstrapBlazor.Components.TreeViewItem<ChannelDeviceTreeItem>> AdaptListTreeViewItemChannelDeviceTreeItem(this global::System.Collections.Generic.List<global::BootstrapBlazor.Components.TreeViewItem<ChannelDeviceTreeItem>> src)
        {
            NormalizeItems(src);
            return src.ToList();
        }
        static void NormalizeItems<T>(List<TreeViewItem<T>> nodes)
        {
            foreach (var node in nodes)
            {
                if (node.Items.Count > 0)
                {
                    node.Items = node.Items.ToList();
                    NormalizeItems(node.Items);
                }
            }
        }


    }
}