<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;

/* _layouts/components/crumbs */
class __TwigTemplate_ff47308f2277bd11d8a917666339a491 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
        $this->sandbox = $this->extensions[SandboxExtension::class];
        $this->checkSecurity();
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        craft\helpers\Template::beginProfile("template", "_layouts/components/crumbs");
        // line 1
        yield "<div id=\"crumbs\"";
        if ( !(isset($context["crumbs"]) || array_key_exists("crumbs", $context) ? $context["crumbs"] : (function () { throw new RuntimeError('Variable "crumbs" does not exist.', 1, $this->source); })())) {
            yield " class=\"empty\"";
        }
        yield ">
    <button id=\"primary-nav-toggle\" class=\"nav-toggle\" title=\"";
        // line 2
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['craft\web\twig\Extension']->translateFilter("Show nav", "app"), "html", null, true);
        yield "\" aria-label=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['craft\web\twig\Extension']->translateFilter("Show nav", "app"), "html", null, true);
        yield "\" aria-expanded=\"false\" aria-controls=\"global-sidebar\" aria-haspopup=\"true\"></button>
    ";
        // line 3
        if ((isset($context["crumbs"]) || array_key_exists("crumbs", $context) ? $context["crumbs"] : (function () { throw new RuntimeError('Variable "crumbs" does not exist.', 3, $this->source); })())) {
            // line 4
            yield "        <nav aria-label=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['craft\web\twig\Extension']->translateFilter("Breadcrumbs", "app"), "html", null, true);
            yield "\">
            <ul class=\"breadcrumb-list\">
                ";
            // line 6
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable((isset($context["crumbs"]) || array_key_exists("crumbs", $context) ? $context["crumbs"] : (function () { throw new RuntimeError('Variable "crumbs" does not exist.', 6, $this->source); })()));
            foreach ($context['_seq'] as $context["_key"] => $context["crumb"]) {
                // line 7
                yield "                    <li>
                        ";
                // line 8
                yield $this->extensions['craft\web\twig\Extension']->tagFunction("a", ["href" => $this->sandbox->ensureToStringAllowed(craft\helpers\Template::attribute($this->env, $this->source,                 // line 9
$context["crumb"], "url", [], "any", false, false, true, 9), 9, $this->source), "text" => $this->sandbox->ensureToStringAllowed(craft\helpers\Template::attribute($this->env, $this->source,                 // line 10
$context["crumb"], "label", [], "any", false, false, true, 10), 10, $this->source), "aria" => ["label" => (((craft\helpers\Template::attribute($this->env, $this->source,                 // line 12
$context["crumb"], "ariaLabel", [], "any", true, true, true, 12) &&  !(null === craft\helpers\Template::attribute($this->env, $this->source, $context["crumb"], "ariaLabel", [], "any", false, false, true, 12)))) ? (craft\helpers\Template::attribute($this->env, $this->source, $context["crumb"], "ariaLabel", [], "any", false, false, true, 12)) : (false))]]);
                // line 14
                yield "
                    </li>
                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['crumb'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 17
            yield "            </ul>
        </nav>
    ";
        }
        // line 20
        yield "</div>
";
        craft\helpers\Template::endProfile("template", "_layouts/components/crumbs");
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "_layouts/components/crumbs";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  91 => 20,  86 => 17,  78 => 14,  76 => 12,  75 => 10,  74 => 9,  73 => 8,  70 => 7,  66 => 6,  60 => 4,  58 => 3,  52 => 2,  45 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("<div id=\"crumbs\"{% if not crumbs %} class=\"empty\"{% endif %}>
    <button id=\"primary-nav-toggle\" class=\"nav-toggle\" title=\"{{ 'Show nav'|t('app') }}\" aria-label=\"{{ 'Show nav'|t('app') }}\" aria-expanded=\"false\" aria-controls=\"global-sidebar\" aria-haspopup=\"true\"></button>
    {% if crumbs %}
        <nav aria-label=\"{{ 'Breadcrumbs'|t('app') }}\">
            <ul class=\"breadcrumb-list\">
                {% for crumb in crumbs %}
                    <li>
                        {{ tag('a', {
                            href: crumb.url,
                            text: crumb.label,
                            aria: {
                                label: crumb.ariaLabel ?? false,
                            },
                        }) }}
                    </li>
                {% endfor %}
            </ul>
        </nav>
    {% endif %}
</div>
", "_layouts/components/crumbs", "/Users/nodata/nodata.local/_controlnocontrol/sites/hjhs.ca/www/craft/vendor/craftcms/cms/src/templates/_layouts/components/crumbs.twig");
    }
    
    public function checkSecurity()
    {
        static $tags = ["if" => 1, "for" => 6];
        static $filters = ["escape" => 2, "t" => 2];
        static $functions = ["tag" => 8];

        try {
            $this->sandbox->checkSecurity(
                ['if', 'for'],
                ['escape', 't'],
                ['tag'],
                $this->source
            );
        } catch (SecurityError $e) {
            $e->setSourceContext($this->source);

            if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
                $e->setTemplateLine($tags[$e->getTagName()]);
            } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
                $e->setTemplateLine($filters[$e->getFilterName()]);
            } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
                $e->setTemplateLine($functions[$e->getFunctionName()]);
            }

            throw $e;
        }

    }
}
