protected function filterEmptyGroups(LayoutData $layout)
    {
        $presences = $layout->layout;

        $remove = [];

        foreach ($presences as $key => $presence) {

            if ( ! $this->filterNestedEmptyGroups($presence)) {
                $remove[] = $key;
            }
        }
        array_forget($presences, $remove);

        $layout->layout = $presences;
    }