public static FigmaInstance GetBaseComponentNode(this NodeProvider fileProvider, FigmaNode node)
        {
            var figmaInstance = node.GetDialogInstanceFromParentContainer();

            if (figmaInstance != null)
            {
                foreach (var item in fileProvider.GetMainLayers())
                {
                    var instance = item.GetDialogInstanceFromParentContainer();
                    if (instance != null && instance.id == figmaInstance.id)
                    {
                        return(instance);
                    }
                }
            }
            return(null);
        }