<?php

use Fisharebest\Webtrees\Individual;

/**
 * @var Individual $individual
 */

?>
<div class="wt-sidebar-content wt-sidebar-family-navigator">
    <!-- parent families -->
    <?php foreach ($individual->childFamilies() as $family) : ?>
        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getChildFamilyLabel($family)]) ?>
    <?php endforeach ?>

    <!-- step parents -->
    <?php foreach ($individual->childStepFamilies() as $family) : ?>
        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getStepFamilyLabel($family)]) ?>
    <?php endforeach ?>

    <!-- spouse and children -->
    <?php foreach ($individual->spouseFamilies() as $family) : ?>
        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getSpouseFamilyLabel($family)]) ?>
    <?php endforeach ?>

    <!-- step children -->
    <?php foreach ($individual->spouseStepFamilies() as $family) : ?>
        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $family->fullName()]) ?>
    <?php endforeach ?>
</div>
