<?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;

/* macros/progressbar.html.twig */
class __TwigTemplate_205e54a8fc23d9262f7bfe128aa374b12f7638dd2da11a480fa8876cd01d097f 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 32
        echo "
";
    }

    // line 1
    public function macro_progressbar($__max__ = null, $__current__ = null, $__title__ = null, $__subTitle__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "max" => $__max__,
            "current" => $__current__,
            "title" => $__title__,
            "subTitle" => $__subTitle__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 2
            echo "    ";
            $context["percentReached"] = 0;
            // line 3
            echo "    ";
            if (1 === twig_compare(($context["max"] ?? null), 0)) {
                // line 4
                echo "        ";
                $context["percentReached"] = (($context["current"] ?? null) / (($context["max"] ?? null) / 100));
                // line 5
                echo "    ";
            }
            // line 6
            echo "    ";
            $context["class"] = "progress-bar-info";
            // line 7
            echo "    ";
            $context["width"] = twig_number_format_filter($this->env, ($context["percentReached"] ?? null), 1, ".", "");
            // line 8
            echo "
    ";
            // line 9
            if (1 === twig_compare(($context["percentReached"] ?? null), 90)) {
                // line 10
                echo "        ";
                $context["class"] = "progress-bar-danger";
                // line 11
                echo "    ";
            } elseif (1 === twig_compare(($context["percentReached"] ?? null), 70)) {
                // line 12
                echo "        ";
                $context["class"] = "progress-bar-warning";
                // line 13
                echo "    ";
            } elseif (1 === twig_compare(($context["percentReached"] ?? null), 50)) {
                // line 14
                echo "        ";
                $context["class"] = "progress-bar-success";
                // line 15
                echo "    ";
            } elseif (1 === twig_compare(($context["percentReached"] ?? null), 30)) {
                // line 16
                echo "        ";
                $context["class"] = "progress-bar-primary";
                // line 17
                echo "    ";
            }
            // line 18
            echo "
    ";
            // line 19
            if (1 === twig_compare(($context["width"] ?? null), 100)) {
                // line 20
                echo "        ";
                $context["width"] = 100;
                // line 21
                echo "    ";
            }
            // line 22
            echo "
    <div class=\"progress-group\">
        <span class=\"progress-text\">";
            // line 24
            echo twig_escape_filter($this->env, ($context["title"] ?? null), "html", null, true);
            if (1 === twig_compare(($context["percentReached"] ?? null), 0)) {
                echo " &ndash; ";
                echo twig_escape_filter($this->env, twig_number_format_filter($this->env, ($context["percentReached"] ?? null), 2), "html", null, true);
                echo "%";
            }
            echo "</span>
        <span class=\"progress-number\">";
            // line 25
            echo twig_escape_filter($this->env, ($context["subTitle"] ?? null), "html", null, true);
            echo "</span>

        <div class=\"progress\">
            <div class=\"progress-bar ";
            // line 28
            echo twig_escape_filter($this->env, ($context["class"] ?? null), "html", null, true);
            echo "\" role=\"progressbar\" aria-valuenow=\"";
            echo twig_escape_filter($this->env, ($context["width"] ?? null), "html", null, true);
            echo "\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: ";
            echo twig_escape_filter($this->env, ($context["width"] ?? null), "html", null, true);
            echo "%\"></div>
        </div>
    </div>
";

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    // line 33
    public function macro_progressbar_small($__max__ = null, $__current__ = null, $__leftValue__ = null, $__leftFormatted__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "max" => $__max__,
            "current" => $__current__,
            "leftValue" => $__leftValue__,
            "leftFormatted" => $__leftFormatted__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 34
            echo "    ";
            $context["percentReached"] = 0;
            // line 35
            echo "    ";
            if (1 === twig_compare(($context["max"] ?? null), 0)) {
                // line 36
                echo "        ";
                $context["percentReached"] = (($context["current"] ?? null) / (($context["max"] ?? null) / 100));
                // line 37
                echo "    ";
            }
            // line 38
            echo "    ";
            $context["class"] = "progress-bar-info";
            // line 39
            echo "    ";
            $context["width"] = twig_number_format_filter($this->env, ($context["percentReached"] ?? null), 1, ".", "");
            // line 40
            echo "
    ";
            // line 41
            if (1 === twig_compare(($context["percentReached"] ?? null), 90)) {
                // line 42
                echo "        ";
                $context["class"] = "progress-bar-danger";
                // line 43
                echo "    ";
            } elseif (1 === twig_compare(($context["percentReached"] ?? null), 70)) {
                // line 44
                echo "        ";
                $context["class"] = "progress-bar-warning";
                // line 45
                echo "    ";
            } elseif (1 === twig_compare(($context["percentReached"] ?? null), 50)) {
                // line 46
                echo "        ";
                $context["class"] = "progress-bar-success";
                // line 47
                echo "    ";
            } elseif (1 === twig_compare(($context["percentReached"] ?? null), 30)) {
                // line 48
                echo "        ";
                $context["class"] = "progress-bar-primary";
                // line 49
                echo "    ";
            }
            // line 50
            echo "
    ";
            // line 51
            if (1 === twig_compare(($context["width"] ?? null), 100)) {
                // line 52
                echo "        ";
                $context["width"] = 100;
                // line 53
                echo "    ";
            }
            // line 54
            echo "
    <div class=\"progress-group\">
        <div class=\"progress progress-sm\">
            <div class=\"progress-bar ";
            // line 57
            echo twig_escape_filter($this->env, ($context["class"] ?? null), "html", null, true);
            echo "\" role=\"progressbar\" aria-valuenow=\"";
            echo twig_escape_filter($this->env, ($context["width"] ?? null), "html", null, true);
            echo "\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: ";
            echo twig_escape_filter($this->env, ($context["width"] ?? null), "html", null, true);
            echo "%\"></div>
        </div>
        ";
            // line 59
            if (( !(null === ($context["leftValue"] ?? null)) && 1 === twig_compare(($context["leftValue"] ?? null), 0))) {
                // line 60
                echo "            <small>";
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("stats.percentUsedLeft", ["%percent%" => twig_number_format_filter($this->env, ($context["percentReached"] ?? null), 0), "%left%" => ($context["leftFormatted"] ?? null)]), "html", null, true);
                echo "</small>
        ";
            } else {
                // line 62
                echo "            <small>";
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("stats.percentUsed", ["%percent%" => twig_number_format_filter($this->env, ($context["percentReached"] ?? null), 0)]), "html", null, true);
                echo "</small>
        ";
            }
            // line 64
            echo "    </div>
";

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    public function getTemplateName()
    {
        return "macros/progressbar.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  254 => 64,  248 => 62,  242 => 60,  240 => 59,  231 => 57,  226 => 54,  223 => 53,  220 => 52,  218 => 51,  215 => 50,  212 => 49,  209 => 48,  206 => 47,  203 => 46,  200 => 45,  197 => 44,  194 => 43,  191 => 42,  189 => 41,  186 => 40,  183 => 39,  180 => 38,  177 => 37,  174 => 36,  171 => 35,  168 => 34,  152 => 33,  135 => 28,  129 => 25,  120 => 24,  116 => 22,  113 => 21,  110 => 20,  108 => 19,  105 => 18,  102 => 17,  99 => 16,  96 => 15,  93 => 14,  90 => 13,  87 => 12,  84 => 11,  81 => 10,  79 => 9,  76 => 8,  73 => 7,  70 => 6,  67 => 5,  64 => 4,  61 => 3,  58 => 2,  42 => 1,  37 => 32,);
    }

    public function getSourceContext()
    {
        return new Source("", "macros/progressbar.html.twig", "/var/www/html/kimai2/templates/macros/progressbar.html.twig");
    }
}
