<?php
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();

/**
 * @global CMain $APPLICATION
 */

global $APPLICATION;

//delayed function must return a string
if(empty($arResult))
	return "";

$strReturn = '';

//we can't use $APPLICATION->SetAdditionalCSS() here because we are inside the buffered function GetNavChain()
if (strpos($APPLICATION->GetCurDir(),"products") || strpos($APPLICATION->GetCurDir(),"solutions")){
	$strReturn .= '<div class="breadcrumbs hero__breadcrumbs"><ol class="breadcrumbs__list">';

} else $strReturn .= '<div class="container container--pt-header container--mb"><div class="breadcrumbs breadcrumbs--pl"> <ol class="breadcrumbs__list">';

$itemSize = count($arResult);
for($index = 0; $index < $itemSize; $index++)
{
	$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
	$arrow = ($index > 0? '<i class="fa fa-angle-right"></i>' : '');
	if  ($arResult[$index]["LINK"]=="/about/") continue;

	if($arResult[$index]["LINK"] <> "" && $index != $itemSize-1)
	{
		$strReturn .= ' <li class="breadcrumbs__item">
            <a href="'.$arResult[$index]["LINK"].'" class="breadcrumbs__link">
              <span class="breadcrumbs__link-text">'.$title.'</span>
    
            </a>
        </li>
        ';
	}
	else
	{
		$strReturn .= '
			<li class="breadcrumbs__item">
              <span class="breadcrumbs__link breadcrumbs__link--current">
                 <span class="breadcrumbs__link-text">'.$title.'</span>
               </span>
            </li>
      ';
	}
}
if (strpos($APPLICATION->GetCurDir(),"products") || strpos($APPLICATION->GetCurDir(),"solutions")){
	$strReturn .= '</ol></div>';
} else $strReturn .= '</ol></div></div>';

return $strReturn;
?>
