<div class="et-usp-bar-item">
    {if $item.link !== null && !empty($item.link.href)}<a href="{$item.link.href}" class="link-discreet et-usp-bar-item-link" title="{$item.link.title}"{if $item.link.external} target="_blank" rel="noreferrer noopener"{/if}>{/if}
        {if !empty($item.image.src)}
            {image lazy=true webp=!empty($item.image.srcWebP)
                src="{$item.image.src}"
                alt="{$item.image.alt}"
                width={$item.image.width}
                height={$item.image.height}
                class="et-usp-bar-item-image"
            }
        {/if}
        {$isLinkGroup = (empty($item.link.href) && !empty($item.linkGroup))}
        {if $isLinkGroup}
            <div class="dropdown">
                <a class="dropdown-toggle et-dropdown-toggle et-usp-bar-linkgroup-headline" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" role="button">
        {/if}
        {if !empty($item.icon)}
            <i class="{$item.icon} et-usp-bar-item-icon"></i>
        {/if}
        {if !empty($item.text.value) || $isLinkGroup}
            {include file='widgets/base/textfield.tpl' value=$item.text fallbackValue="{if $isLinkGroup}{$item.linkGroup->getName()}{/if}" type='span' classes='et-usp-bar-item-text' isDropdownControl=$isLinkGroup}
        {/if}
        {if $isLinkGroup}
                </a>
                <div class="dropdown-menu dropdown-menu-right">
                    {foreach from=$item.linkGroup->getLinks() item='link'}
                        <a class="et-usp-bar-linkgroup-link dropdown-item" href="{$link->getURL()}" title="{$link->getName()}" rel="{if $link->getNoFollow()}nofollow{/if}">{$link->getName()}</a>
                    {/foreach}
                </div>
            </div>
        {/if}
    {if $item.link !== null && !empty($item.link.href)}</a>{/if}
</div>