<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;

/* invoice/renderer/javascript.json.twig */
class __TwigTemplate_bee6286b1d8b7c72f67d0e78435da206ed5cfbabbe1459d8535a8d43e0f99c13 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        $context["json"] = twig_get_attribute($this->env, $this->source, ($context["model"] ?? null), "toArray", [], "any", false, false, false, 1);
        // line 2
        $context["items"] = [];
        // line 3
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["model"] ?? null), "calculator", [], "any", false, false, false, 3), "entries", [], "any", false, false, false, 3));
        foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
            // line 4
            $context["items"] = twig_array_merge(($context["items"] ?? null), [0 => twig_get_attribute($this->env, $this->source, ($context["model"] ?? null), "itemToArray", [0 => $context["entry"]], "method", false, false, false, 4)]);
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 6
        $context["json"] = twig_array_merge(($context["json"] ?? null), ["items" => ($context["items"] ?? null)]);
        // line 7
        echo json_encode(($context["json"] ?? null));
    }

    public function getTemplateName()
    {
        return "invoice/renderer/javascript.json.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  53 => 7,  51 => 6,  45 => 4,  41 => 3,  39 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "invoice/renderer/javascript.json.twig", "/var/www/html/kimai2/templates/invoice/renderer/javascript.json.twig");
    }
}
