protected function interpretNestedGroupLayout(array $data)
    {
        foreach ($data as $key => &$value) {

            if ( ! is_array($value)) {
                continue;
            }

            // The child is a group, so make a presence object for it
            $children = array_get($value, 'children', []);
            $children = $this->interpretNestedGroupLayout($children);

            $value = new MenuPresence([
                'id'               => $key ?: array_get($value, 'id'),
                'type'             => MenuPresenceType::GROUP,
                'label'            => array_get($value, 'label'),
                'label_translated' => array_get($value, 'label_translated'),
                'icon'             => array_get($value, 'icon'),
                'children'         => $children,
            ]);
        }

        unset ($value);

        return $data;
    }