<?php

class __Mustache_b5fbe719fa0db1260293bbe32fc083c6 extends Mustache_Template
{
    private $lambdaHelper;

    public function renderInternal(Mustache_Context $context, $indent = '')
    {
        $this->lambdaHelper = new Mustache_LambdaHelper($this->mustache, $context);
        $buffer = '';

        $buffer .= $indent . '<div class="container-fluid tertiary-navigation full-width-bottom-border">
';
        $buffer .= $indent . '    <div class="d-flex">
';
        $value = $context->find('generalnavselector');
        $buffer .= $this->section70583f5a8fcc1cd4ae6828417b1997a8($context, $indent, $value);
        $value = $context->find('exportselector');
        $buffer .= $this->sectionD7b856e41fcff44174766e43b001b803($context, $indent, $value);
        $buffer .= $indent . '    </div>
';
        $buffer .= $indent . '</div>
';

        return $buffer;
    }

    private function section70583f5a8fcc1cd4ae6828417b1997a8(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
            <div class="navitem">
                {{>core/tertiary_navigation_selector}}
            </div>
            <div class="navitem-divider"></div>
        ';
            $result = (string) call_user_func($value, $source, $this->lambdaHelper);
            $buffer .= $result;
        } elseif (!empty($value)) {
            $values = $this->isIterable($value) ? $value : array($value);
            foreach ($values as $value) {
                $context->push($value);
                
                $buffer .= $indent . '            <div class="navitem">
';
                if ($partial = $this->mustache->loadPartial('core/tertiary_navigation_selector')) {
                    $buffer .= $partial->renderInternal($context, $indent . '                ');
                }
                $buffer .= $indent . '            </div>
';
                $buffer .= $indent . '            <div class="navitem-divider"></div>
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function sectionF6eb9fdab40d81993f878bb418475209(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
                document.querySelector(\'#{{baseid}}\').addEventListener(\'change\', function(e) {
                    window.location.href = e.target.value;
                });
            ';
            $result = (string) call_user_func($value, $source, $this->lambdaHelper);
            $buffer .= $result;
        } elseif (!empty($value)) {
            $values = $this->isIterable($value) ? $value : array($value);
            foreach ($values as $value) {
                $context->push($value);
                
                $buffer .= $indent . '                document.querySelector(\'#';
                $value = $this->resolveValue($context->find('baseid'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '\').addEventListener(\'change\', function(e) {
';
                $buffer .= $indent . '                    window.location.href = e.target.value;
';
                $buffer .= $indent . '                });
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function sectionD7b856e41fcff44174766e43b001b803(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
            <div class="navitem">
                {{>core/select_menu}}
            </div>
            {{#js}}
                document.querySelector(\'#{{baseid}}\').addEventListener(\'change\', function(e) {
                    window.location.href = e.target.value;
                });
            {{/js}}
        ';
            $result = (string) call_user_func($value, $source, $this->lambdaHelper);
            $buffer .= $result;
        } elseif (!empty($value)) {
            $values = $this->isIterable($value) ? $value : array($value);
            foreach ($values as $value) {
                $context->push($value);
                
                $buffer .= $indent . '            <div class="navitem">
';
                if ($partial = $this->mustache->loadPartial('core/select_menu')) {
                    $buffer .= $partial->renderInternal($context, $indent . '                ');
                }
                $buffer .= $indent . '            </div>
';
                $value = $context->find('js');
                $buffer .= $this->sectionF6eb9fdab40d81993f878bb418475209($context, $indent, $value);
                $context->pop();
            }
        }
    
        return $buffer;
    }

}
