<?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;

/* dashboard/statistics/platformStatistics.html.twig */
class __TwigTemplate_e290ff1a0a1f1cffb77d70e438ced0c06c564bc7a1a8aee2603099934a25f55e 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;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "dashboard/statistics/platformStatistics.html.twig"));

        // line 1
        echo "<div class=\"card bg-light\">
    <div class=\"card-header\">
        <i class=\"fas fa-chart-pie\"></i>&nbsp;Platform resources
    </div>
    <div class=\"card-body\">
        <div id=\"platformStatistics\"></div>
    </div>
    <div class=\"card-footer text-muted\">
        <small><code><i class=\"fas fa-exclamation-triangle\"></i>&nbsp;Non persistent cache storage</code></small>
    </div>
</div>

<script>
    var platformStatisticsOptions = {
        labels: [
            \"AGS line items\",
            \"AGS scores\",
            \"AGS results\",
            \"ACS assessments\",
            \"ACS controls\",
            \"Basic outcomes\",
            \"NRPS memberships\"
        ],
        fill: {
            opacity: 0.7
        },
        yaxis: {
            tickAmount: 1,
            labels: {
                formatter: function(val) {
                    return val.toFixed(0)
                }
            },
        },
        series: [
                ";
        // line 36
        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "agsLineItems", [], "any", true, true, false, 36)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "agsLineItems", [], "any", false, false, false, 36), 0)) : (0)), "html", null, true);
        echo ",
                ";
        // line 37
        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "agsScores", [], "any", true, true, false, 37)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "agsScores", [], "any", false, false, false, 37), 0)) : (0)), "html", null, true);
        echo ",
                ";
        // line 38
        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "agsResults", [], "any", true, true, false, 38)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "agsResults", [], "any", false, false, false, 38), 0)) : (0)), "html", null, true);
        echo ",
                ";
        // line 39
        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "acsAssessments", [], "any", true, true, false, 39)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "acsAssessments", [], "any", false, false, false, 39), 0)) : (0)), "html", null, true);
        echo ",
                ";
        // line 40
        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "acsControls", [], "any", true, true, false, 40)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "acsControls", [], "any", false, false, false, 40), 0)) : (0)), "html", null, true);
        echo ",
                ";
        // line 41
        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "basicOutcomes", [], "any", true, true, false, 41)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "basicOutcomes", [], "any", false, false, false, 41), 0)) : (0)), "html", null, true);
        echo ",
                ";
        // line 42
        echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "nrpsMemberships", [], "any", true, true, false, 42)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["statistics"] ?? null), "nrpsMemberships", [], "any", false, false, false, 42), 0)) : (0)), "html", null, true);
        echo ",
        ],
        chart: {
            type: 'polarArea',
            toolbar: {
                show: false,
            },
            events: {
                dataPointSelection(event, chartContext, config) {
                    let redirectUrl = false;

                    switch(config.w.config.labels[config.dataPointIndex]) {
                        case \"AGS line items\":
                        case \"AGS scores\":
                        case \"AGS results\":
                            redirectUrl = \"";
        // line 57
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("platform_ags_list_line_items");
        echo "\";
                            break;
                        case \"ACS assessments\":
                        case \"ACS controls\":
                            redirectUrl = \"";
        // line 61
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("platform_proctoring_list_assessments");
        echo "\";
                            break;
                        case \"Basic outcomes\":
                            redirectUrl = \"";
        // line 64
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("platform_basic_outcome_list");
        echo "\";
                            break;
                        case \"NRPS memberships\":
                            redirectUrl = \"";
        // line 67
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("platform_nrps_list_memberships");
        echo "\";
                            break;
                    }

                    if (redirectUrl !== false) {
                        window.location.href = redirectUrl;
                    }
                }
            }
        },
        dataLabels: {
            enabled: false
        },
        plotOptions: {
            bar: {
                borderRadius: 4,
                horizontal: true,
                distributed: true,
                barHeight: '70%'
            }
        },
        legend: {
            show: true,
            formatter: function(val, opts) {
                return val + ' (' + opts.w.globals.series[opts.seriesIndex] + ')'
            }
        },
        responsive: [{
            breakpoint: 1000,
            options: {
                legend: {
                    position: 'right'
                }
            }
        }]
    };

    var platformStatisticsChart = new ApexCharts(
        document.querySelector('#platformStatistics'),
        platformStatisticsOptions
    );

    platformStatisticsChart.render();
</script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "dashboard/statistics/platformStatistics.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  138 => 67,  132 => 64,  126 => 61,  119 => 57,  101 => 42,  97 => 41,  93 => 40,  89 => 39,  85 => 38,  81 => 37,  77 => 36,  40 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div class=\"card bg-light\">
    <div class=\"card-header\">
        <i class=\"fas fa-chart-pie\"></i>&nbsp;Platform resources
    </div>
    <div class=\"card-body\">
        <div id=\"platformStatistics\"></div>
    </div>
    <div class=\"card-footer text-muted\">
        <small><code><i class=\"fas fa-exclamation-triangle\"></i>&nbsp;Non persistent cache storage</code></small>
    </div>
</div>

<script>
    var platformStatisticsOptions = {
        labels: [
            \"AGS line items\",
            \"AGS scores\",
            \"AGS results\",
            \"ACS assessments\",
            \"ACS controls\",
            \"Basic outcomes\",
            \"NRPS memberships\"
        ],
        fill: {
            opacity: 0.7
        },
        yaxis: {
            tickAmount: 1,
            labels: {
                formatter: function(val) {
                    return val.toFixed(0)
                }
            },
        },
        series: [
                {{ statistics.agsLineItems|default(0) }},
                {{ statistics.agsScores|default(0) }},
                {{ statistics.agsResults|default(0) }},
                {{ statistics.acsAssessments|default(0) }},
                {{ statistics.acsControls|default(0) }},
                {{ statistics.basicOutcomes|default(0) }},
                {{ statistics.nrpsMemberships|default(0) }},
        ],
        chart: {
            type: 'polarArea',
            toolbar: {
                show: false,
            },
            events: {
                dataPointSelection(event, chartContext, config) {
                    let redirectUrl = false;

                    switch(config.w.config.labels[config.dataPointIndex]) {
                        case \"AGS line items\":
                        case \"AGS scores\":
                        case \"AGS results\":
                            redirectUrl = \"{{ path('platform_ags_list_line_items') }}\";
                            break;
                        case \"ACS assessments\":
                        case \"ACS controls\":
                            redirectUrl = \"{{ path('platform_proctoring_list_assessments') }}\";
                            break;
                        case \"Basic outcomes\":
                            redirectUrl = \"{{ path('platform_basic_outcome_list') }}\";
                            break;
                        case \"NRPS memberships\":
                            redirectUrl = \"{{ path('platform_nrps_list_memberships') }}\";
                            break;
                    }

                    if (redirectUrl !== false) {
                        window.location.href = redirectUrl;
                    }
                }
            }
        },
        dataLabels: {
            enabled: false
        },
        plotOptions: {
            bar: {
                borderRadius: 4,
                horizontal: true,
                distributed: true,
                barHeight: '70%'
            }
        },
        legend: {
            show: true,
            formatter: function(val, opts) {
                return val + ' (' + opts.w.globals.series[opts.seriesIndex] + ')'
            }
        },
        responsive: [{
            breakpoint: 1000,
            options: {
                legend: {
                    position: 'right'
                }
            }
        }]
    };

    var platformStatisticsChart = new ApexCharts(
        document.querySelector('#platformStatistics'),
        platformStatisticsOptions
    );

    platformStatisticsChart.render();
</script>
", "dashboard/statistics/platformStatistics.html.twig", "C:\\wamp64\\www\\devkit-lti1p3-master-tool\\templates\\dashboard\\statistics\\platformStatistics.html.twig");
    }
}
