<?php

class __Mustache_ff38b11053af97c4519c28301512d2d2 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="mfp">
';
        $buffer .= $indent . '    <section class="mfp-hero">
';
        $buffer .= $indent . '        <div>
';
        $buffer .= $indent . '            <span>';
        $value = $context->find('str');
        $buffer .= $this->section2103fe6f7a702b22e8199ffa5571df42($context, $indent, $value);
        $buffer .= '</span>
';
        $buffer .= $indent . '            <h2>';
        $value = $context->find('str');
        $buffer .= $this->section69ba7b55ba9bf513727325f7806f952c($context, $indent, $value);
        $buffer .= '</h2>
';
        $buffer .= $indent . '            <p>';
        $value = $context->find('str');
        $buffer .= $this->section03eb4adb3813accb369aa6235b940573($context, $indent, $value);
        $buffer .= '</p>
';
        $buffer .= $indent . '        </div>
';
        $buffer .= $indent . '        <div class="mfp-hero__actions">
';
        $buffer .= $indent . '            <a class="btn btn-primary" href="';
        $value = $this->resolveValue($context->find('newurl'), $context);
        $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
        $buffer .= '">
';
        $buffer .= $indent . '                ';
        $value = $context->find('str');
        $buffer .= $this->section14818d5f84c98022bc30705d463867af($context, $indent, $value);
        $buffer .= '
';
        $buffer .= $indent . '            </a>
';
        $value = $context->find('canreview');
        $buffer .= $this->section84c99ae444a083e5b42a1a5ba29e0ab9($context, $indent, $value);
        $buffer .= $indent . '        </div>
';
        $buffer .= $indent . '    </section>
';
        $buffer .= $indent . '
';
        $value = $context->find('hascards');
        $buffer .= $this->section11db4d1dc8fb3e72b9b6422ad504c74c($context, $indent, $value);
        $buffer .= $indent . '
';
        $value = $context->find('hascards');
        if (empty($value)) {
            
            $buffer .= $indent . '        <section class="mfp-empty">
';
            $buffer .= $indent . '            <strong>';
            $value = $context->find('str');
            $buffer .= $this->section6ad04abd043fd166178a6dcbdabe85ae($context, $indent, $value);
            $buffer .= '</strong>
';
            $buffer .= $indent . '            <p>';
            $value = $context->find('str');
            $buffer .= $this->section192e96e01d9585feff6c4f88c9fb304b($context, $indent, $value);
            $buffer .= '</p>
';
            $buffer .= $indent . '        </section>
';
        }
        $buffer .= $indent . '</div>
';
        $buffer .= $indent . '
';
        $value = $context->find('js');
        $buffer .= $this->section250774553a3c9a61da1541c4492e4f83($context, $indent, $value);

        return $buffer;
    }

    private function section2103fe6f7a702b22e8199ffa5571df42(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'myspace, local_miflora_portfolio';
            $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 .= 'myspace, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section69ba7b55ba9bf513727325f7806f952c(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'portfoliotitle, local_miflora_portfolio';
            $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 .= 'portfoliotitle, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section03eb4adb3813accb369aa6235b940573(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'portfoliodescription, local_miflora_portfolio';
            $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 .= 'portfoliodescription, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section14818d5f84c98022bc30705d463867af(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'newevidence, local_miflora_portfolio';
            $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 .= 'newevidence, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function sectionF97c85cdf0f8c759c8f50011dff0d930(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'reviewqueue, local_miflora_portfolio';
            $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 .= 'reviewqueue, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section84c99ae444a083e5b42a1a5ba29e0ab9(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
                <a class="btn btn-outline-primary" href="{{reviewurl}}">
                    {{#str}}reviewqueue, local_miflora_portfolio{{/str}}
                </a>
            ';
            $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 . '                <a class="btn btn-outline-primary" href="';
                $value = $this->resolveValue($context->find('reviewurl'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '">
';
                $buffer .= $indent . '                    ';
                $value = $context->find('str');
                $buffer .= $this->sectionF97c85cdf0f8c759c8f50011dff0d930($context, $indent, $value);
                $buffer .= '
';
                $buffer .= $indent . '                </a>
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section6e49fc9dd1c22fc82fed365abffe42c4(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
                            <img src="{{imageurl}}" alt="{{title}}" loading="lazy">
                        ';
            $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 . '                            <img src="';
                $value = $this->resolveValue($context->find('imageurl'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '" alt="';
                $value = $this->resolveValue($context->find('title'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '" loading="lazy">
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section4fb3612fe0a63c4c8219ec3b48ccd0d6(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'deleteevidence, local_miflora_portfolio';
            $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 .= 'deleteevidence, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section9092e6b5a59b610980a221d753d1536f(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
                            <span class="mfp-card__delete" data-deleteurl="{{deleteurl}}" title="{{#str}}deleteevidence, local_miflora_portfolio{{/str}}">🗑</span>
                        ';
            $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 . '                            <span class="mfp-card__delete" data-deleteurl="';
                $value = $this->resolveValue($context->find('deleteurl'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '" title="';
                $value = $context->find('str');
                $buffer .= $this->section4fb3612fe0a63c4c8219ec3b48ccd0d6($context, $indent, $value);
                $buffer .= '">🗑</span>
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function sectionF75b80c6f99c8d88baefe504a10cf56c(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
                <a class="mfp-card" href="{{viewurl}}">
                    <div class="mfp-card__media">
                        {{#hasimage}}
                            <img src="{{imageurl}}" alt="{{title}}" loading="lazy">
                        {{/hasimage}}
                        {{^hasimage}}
                            <div class="mfp-card__placeholder">FT</div>
                        {{/hasimage}}
                    </div>
                    <div class="mfp-card__body">
                        <span class="mfp-status {{statusclass}}">{{status}}</span>
                        <h3>{{title}}</h3>
                        <p>{{description}}</p>
                        <small class="mfp-card__meta">{{owner}} · {{date}}</small>
                        {{#candelete}}
                            <span class="mfp-card__delete" data-deleteurl="{{deleteurl}}" title="{{#str}}deleteevidence, local_miflora_portfolio{{/str}}">🗑</span>
                        {{/candelete}}
                    </div>
                </a>
            ';
            $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 . '                <a class="mfp-card" href="';
                $value = $this->resolveValue($context->find('viewurl'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '">
';
                $buffer .= $indent . '                    <div class="mfp-card__media">
';
                $value = $context->find('hasimage');
                $buffer .= $this->section6e49fc9dd1c22fc82fed365abffe42c4($context, $indent, $value);
                $value = $context->find('hasimage');
                if (empty($value)) {
                    
                    $buffer .= $indent . '                            <div class="mfp-card__placeholder">FT</div>
';
                }
                $buffer .= $indent . '                    </div>
';
                $buffer .= $indent . '                    <div class="mfp-card__body">
';
                $buffer .= $indent . '                        <span class="mfp-status ';
                $value = $this->resolveValue($context->find('statusclass'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '">';
                $value = $this->resolveValue($context->find('status'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '</span>
';
                $buffer .= $indent . '                        <h3>';
                $value = $this->resolveValue($context->find('title'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '</h3>
';
                $buffer .= $indent . '                        <p>';
                $value = $this->resolveValue($context->find('description'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '</p>
';
                $buffer .= $indent . '                        <small class="mfp-card__meta">';
                $value = $this->resolveValue($context->find('owner'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= ' · ';
                $value = $this->resolveValue($context->find('date'), $context);
                $buffer .= ($value === null ? '' : call_user_func($this->mustache->getEscape(), $value));
                $buffer .= '</small>
';
                $value = $context->find('candelete');
                $buffer .= $this->section9092e6b5a59b610980a221d753d1536f($context, $indent, $value);
                $buffer .= $indent . '                    </div>
';
                $buffer .= $indent . '                </a>
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section11db4d1dc8fb3e72b9b6422ad504c74c(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
        <div class="mfp-grid">
            {{#cards}}
                <a class="mfp-card" href="{{viewurl}}">
                    <div class="mfp-card__media">
                        {{#hasimage}}
                            <img src="{{imageurl}}" alt="{{title}}" loading="lazy">
                        {{/hasimage}}
                        {{^hasimage}}
                            <div class="mfp-card__placeholder">FT</div>
                        {{/hasimage}}
                    </div>
                    <div class="mfp-card__body">
                        <span class="mfp-status {{statusclass}}">{{status}}</span>
                        <h3>{{title}}</h3>
                        <p>{{description}}</p>
                        <small class="mfp-card__meta">{{owner}} · {{date}}</small>
                        {{#candelete}}
                            <span class="mfp-card__delete" data-deleteurl="{{deleteurl}}" title="{{#str}}deleteevidence, local_miflora_portfolio{{/str}}">🗑</span>
                        {{/candelete}}
                    </div>
                </a>
            {{/cards}}
        </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="mfp-grid">
';
                $value = $context->find('cards');
                $buffer .= $this->sectionF75b80c6f99c8d88baefe504a10cf56c($context, $indent, $value);
                $buffer .= $indent . '        </div>
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section6ad04abd043fd166178a6dcbdabe85ae(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'noevidence, local_miflora_portfolio';
            $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 .= 'noevidence, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section192e96e01d9585feff6c4f88c9fb304b(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'noevidencedesc, local_miflora_portfolio';
            $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 .= 'noevidencedesc, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function sectionB4bc4b6c70f635064d4c84c639a0902b(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = 'confirmdelete, local_miflora_portfolio';
            $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 .= 'confirmdelete, local_miflora_portfolio';
                $context->pop();
            }
        }
    
        return $buffer;
    }

    private function section250774553a3c9a61da1541c4492e4f83(Mustache_Context $context, $indent, $value)
    {
        $buffer = '';
    
        if (!is_string($value) && is_callable($value)) {
            $source = '
document.querySelectorAll(\'.mfp-card__delete\').forEach(function(button) {
    button.addEventListener(\'click\', function(event) {
        event.preventDefault();
        event.stopPropagation();
        if (window.confirm(\'{{#str}}confirmdelete, local_miflora_portfolio{{/str}}\')) {
            window.location.href = button.dataset.deleteurl;
        }
    });
});
';
            $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.querySelectorAll(\'.mfp-card__delete\').forEach(function(button) {
';
                $buffer .= $indent . '    button.addEventListener(\'click\', function(event) {
';
                $buffer .= $indent . '        event.preventDefault();
';
                $buffer .= $indent . '        event.stopPropagation();
';
                $buffer .= $indent . '        if (window.confirm(\'';
                $value = $context->find('str');
                $buffer .= $this->sectionB4bc4b6c70f635064d4c84c639a0902b($context, $indent, $value);
                $buffer .= '\')) {
';
                $buffer .= $indent . '            window.location.href = button.dataset.deleteurl;
';
                $buffer .= $indent . '        }
';
                $buffer .= $indent . '    });
';
                $buffer .= $indent . '});
';
                $context->pop();
            }
        }
    
        return $buffer;
    }

}
