<?php if(!empty($breadcrumbs)) {
    $collapse_class = $settings['collapse_mobile'] === 'yes' ? ' collapse-mobile': '';

    ?>
    <div class="breadcrumb-wrapper<?= $collapse_class ?>">
        <ul class="breadcrumbs" id="breadcrumbs">
            <?php foreach ($breadcrumbs as $crumb) {
                ?>
                <?php if ($crumb->href && $crumb->title) { ?>
                    <?php if ($crumb->separator) { ?>
                        <li class="separator">
                            <?php if(!empty($settings['icon_separator']['value'])){
                                \Elementor\Icons_Manager::render_icon($settings['icon_separator'], ['aria-hidden' => 'true']);
                            } else if(isset($settings['icon_separator_text'])){
                                echo $settings['icon_separator_text'];
                             } ?>
                        </li>
                    <?php } ?>
                        <li class="item <?= $crumb->class ?>">
                    <?php if ($crumb->href) { ?>
                        <a href="<?= $crumb->href ?>"><?= $crumb->home ? __($crumb->title, 'webien') : $crumb->title ?></a>
                    <?php } else { ?>
                        <?php echo $crumb->title ?>
                    <?php } ?>
                        </li>
                <?php } ?>
            <?php } ?>
        </ul>

        <?php if ($settings['collapse_mobile'] === 'yes') { ?>
        <ul class="breadcrumbs collapsed">
            <?php foreach ($breadcrumbs_collapsed as $crumb) { ?>
                <?php if ($crumb->href && $crumb->title) { ?>
                    <?php if ($crumb->separator) { ?>
                        <li class="separator"><?php \Elementor\Icons_Manager::render_icon($settings['icon_separator_mobile'], ['aria-hidden' => 'true']); ?></li>
                    <?php } ?>
                    <li class="item <?= $crumb->class ?>">
                        <?php if ($crumb->href) { ?>
                            <a href="<?= $crumb->href ?>"><?= $crumb->home ? __($crumb->title, 'webien') : $crumb->title ?></a>
                        <?php } else { ?>
                            <?php echo $crumb->title ?>
                        <?php } ?>
                    </li>
                <?php } ?>
            <?php } ?>
        </ul>
        <?php } ?>
    </div>
<?php } ?>
