protected function getGroupContentColumns(): array
    {
        $contents = $this->getGroupContents();

        $contentCount = count($contents);

        $denominator = floor(static::GRID_SIZE_WITHOUT_LABEL / $contentCount);

        $labelWidth = $denominator > 1 ? 2 : 1;

        // If there is enough space, make labels size 2
        // and spread the rest as evenly as possible over the fields
        // If there is not enough space, try again with labels at size 1
        $labelsTotalWidth = $labelWidth * array_reduce(
            $contents,
            function ($total, $content) {
                return $total + ($content['type'] !== 'field' ? 1 : 0);
            }
        );

        $fieldsCount = array_reduce(
            $contents,
            function ($total, $content) {
                return $total + ($content['type'] === 'field' ? 1 : 0);
            }
        );

        $fieldWidth = (int) floor((static::GRID_SIZE_WITHOUT_LABEL - $labelsTotalWidth) / $fieldsCount);

        $columns = [];

        foreach ($contents as $content) {

            $columns[] = ($content['type'] === 'field') ? $fieldWidth : $labelWidth;
        }

        return $columns;
    }