{% set nav_component_item_header_id = 'nav-component-item-header--' ~ component_item.id %}
{% set classes = ['component', 'navigation-component-item'] %}
<div id="{{ nav_component_item_header_id }}" {{ attributes.addClass(component_wrapper_class) }}>

    <div{{ content_attributes.addClass('component-item--content') }}>
        {% if content.grid_type == 'grid_icon' %}
            <div class = "item--grid-icon" style="background-color:{% if content.background_color is not empty %}{{ content.background_color }}{% endif %}">
              {% if content.field_fg_link.0['#url'] is not empty %}
                <a href = "{{ content.field_fg_link.0['#url'] }}" class = 'link--wrapper-item'>
                  {{ content.title }}
                  {{ content.field_fg_icon_image }}
                </a>
              {% else %}
                <div class = 'div--wrapper-item'>
                  {{ content.title }}
                  {{ content.field_fg_icon_image }}
                </div>
              {% endif %}
            </div>
        {% elseif content.grid_type == 'grid_image_text' %}
            <div class = 'item--grid-image-text'>
              {% if content.field_fg_link.0['#url'] is not empty %}
                <a href = "{{ content.field_fg_link.0['#url'] }}" class = 'link--wrapper-item'>
                  {{ content.field_fg_big_image }}
                  <div class = 'item--grid-image-text-grid-info' style="background-color:{% if content.background_color is not empty %}{{ content.background_color }}{% endif %}">
                    {{ content.title }}
                    {{ content.field_fg_short_description }}
                  </div>
                </a>
              {% else %}
                <div class = 'div--wrapper-item'>
                  {{ content.field_fg_big_image }}
                  <div class = 'item--grid-image-text-grid-info' style="background-color:{% if content.background_color is not empty %}{{ content.background_color }}{% endif %}">
                    {{ content.title }}
                    {{ content.field_fg_short_description }}
                  </div>
                </div>
              {% endif %}
            </div>
        {% endif %}
    </div>
</div>
