<?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;

/* tool/ajax/ags/actionsLineItem.html.twig */
class __TwigTemplate_632e9ed2999f93a57cda150c33cf8dca8f8b8526d0d4fc470f67ed35c0e8dfe9 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", "tool/ajax/ags/actionsLineItem.html.twig"));

        // line 1
        echo "<div id=\"agsModalActions-";
        echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 1, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
        echo "\" class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">
";
        // line 2
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["actions"]) || array_key_exists("actions", $context) ? $context["actions"] : (function () { throw new RuntimeError('Variable "actions" does not exist.', 2, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["action"]) {
            // line 3
            echo "    ";
            if (($context["action"] == "prepare-score")) {
                // line 4
                echo "        <button
                id=\"ags-line-item-prepare-score-btn-";
                // line 5
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 5, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-info text-white ags-line-item-action-";
                // line 6
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 6, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 7
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 8
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 8, $this->source); })()), "identifier", [], "any", false, false, false, 8), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 9
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 9, $this->source); })()), "identifier", [], "any", false, false, false, 9), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 10
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_prepare_score", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 10, $this->source); })()), "identifier", [], "any", false, false, false, 10))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-poll\"></i>&nbsp;Publish score
        </button>
    ";
            }
            // line 15
            echo "    ";
            if (($context["action"] == "publish-score")) {
                // line 16
                echo "        <a
                id=\"ags-line-item-send-score-btn-";
                // line 17
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 17, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-info text-white ags-line-item-action-";
                // line 18
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 18, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 19
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 20
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 20, $this->source); })()), "identifier", [], "any", false, false, false, 20), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 21
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 21, $this->source); })()), "identifier", [], "any", false, false, false, 21), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 22
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_publish_score", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 22, $this->source); })()), "identifier", [], "any", false, false, false, 22))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-poll\"></i>&nbsp;Publish score
        </a>
    ";
            }
            // line 27
            echo "    ";
            if (($context["action"] == "prepare-results")) {
                // line 28
                echo "        <a
                id=\"ags-line-item-prepare-results-btn-";
                // line 29
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 29, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-info text-white ags-line-item-action-";
                // line 30
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 30, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 31
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 32
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 32, $this->source); })()), "identifier", [], "any", false, false, false, 32), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 33
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 33, $this->source); })()), "identifier", [], "any", false, false, false, 33), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 34
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_prepare_results", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 34, $this->source); })()), "identifier", [], "any", false, false, false, 34))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-poll-h\"></i>&nbsp;Get Results
        </a>
    ";
            }
            // line 39
            echo "    ";
            if (($context["action"] == "list-results")) {
                // line 40
                echo "        <a
                id=\"ags-line-item-list-results-btn-";
                // line 41
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 41, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-info text-white ags-line-item-action-";
                // line 42
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 42, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 43
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 44
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 44, $this->source); })()), "identifier", [], "any", false, false, false, 44), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 45
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 45, $this->source); })()), "identifier", [], "any", false, false, false, 45), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 46
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_list_results", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 46, $this->source); })()), "identifier", [], "any", false, false, false, 46))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-poll-h\"></i>&nbsp;Get Results
        </a>
    ";
            }
            // line 51
            echo "    ";
            if (($context["action"] == "create")) {
                // line 52
                echo "        <a
                id=\"ags-line-item-create-btn-";
                // line 53
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 53, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-primary text-white ags-line-item-action-";
                // line 54
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 54, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 55
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 56
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 56, $this->source); })()), "identifier", [], "any", false, false, false, 56), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 57
                echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_create_lineitem");
                echo "\"
        >
            <i class=\"fas fa-save\"></i>&nbsp;Save
        </a>
    ";
            }
            // line 62
            echo "    ";
            if (($context["action"] == "edit")) {
                // line 63
                echo "        <a
                id=\"ags-line-item-edit-btn-";
                // line 64
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 64, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-primary text-white ags-line-item-action-";
                // line 65
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 65, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 66
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 67
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 67, $this->source); })()), "identifier", [], "any", false, false, false, 67), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 68
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 68, $this->source); })()), "identifier", [], "any", false, false, false, 68), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 69
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_prepare_update_lineitem", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 69, $this->source); })()), "identifier", [], "any", false, false, false, 69))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-edit\"></i>&nbsp;Edit
        </a>
    ";
            }
            // line 74
            echo "    ";
            if (($context["action"] == "delete")) {
                // line 75
                echo "        <a
                id=\"ags-line-item-delete-btn-";
                // line 76
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 76, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-danger text-white ags-line-item-action-";
                // line 77
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 77, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 78
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 79
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 79, $this->source); })()), "identifier", [], "any", false, false, false, 79), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 80
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 80, $this->source); })()), "identifier", [], "any", false, false, false, 80), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 81
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_delete_lineitem", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 81, $this->source); })()), "identifier", [], "any", false, false, false, 81))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-trash\"></i>&nbsp;Delete
        </a>
    ";
            }
            // line 86
            echo "    ";
            if (($context["action"] == "update")) {
                // line 87
                echo "        <a
                id=\"ags-line-item-update-btn-";
                // line 88
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 88, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-primary text-white ags-line-item-action-";
                // line 89
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 89, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 90
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 91
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 91, $this->source); })()), "identifier", [], "any", false, false, false, 91), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 92
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 92, $this->source); })()), "identifier", [], "any", false, false, false, 92), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 93
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_update_lineitem", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 93, $this->source); })()), "identifier", [], "any", false, false, false, 93))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-save\"></i>&nbsp;Save
        </a>
    ";
            }
            // line 98
            echo "    ";
            if (($context["action"] == "cancel")) {
                // line 99
                echo "        <a
                id=\"ags-line-item-cancel-btn-";
                // line 100
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 100, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-secondary text-white ags-line-item-action-";
                // line 101
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 101, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 102
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 103
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 103, $this->source); })()), "identifier", [], "any", false, false, false, 103), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 104
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 104, $this->source); })()), "identifier", [], "any", false, false, false, 104), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 105
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_view_lineitem", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 105, $this->source); })()), "identifier", [], "any", false, false, false, 105))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-undo-alt\"></i>&nbsp;Cancel
        </a>
    ";
            }
            // line 110
            echo "    ";
            if (($context["action"] == "go-back")) {
                // line 111
                echo "        <a
                id=\"ags-line-item-back-btn-";
                // line 112
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 112, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                class=\"btn btn-secondary text-white ags-line-item-action-";
                // line 113
                echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 113, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
                echo "\"
                data-action=\"";
                // line 114
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\"
                data-registration=\"";
                // line 115
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["registration"]) || array_key_exists("registration", $context) ? $context["registration"] : (function () { throw new RuntimeError('Variable "registration" does not exist.', 115, $this->source); })()), "identifier", [], "any", false, false, false, 115), "html", null, true);
                echo "\"
                data-line-item-identifier=\"";
                // line 116
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 116, $this->source); })()), "identifier", [], "any", false, false, false, 116), "html", null, true);
                echo "\"
                data-line-item-url=\"";
                // line 117
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_ags_view_lineitem", ["lineItemIdentifier" => $this->extensions['App\Twig\AppExtension']->base64UrlEncode(twig_get_attribute($this->env, $this->source, (isset($context["lineItem"]) || array_key_exists("lineItem", $context) ? $context["lineItem"] : (function () { throw new RuntimeError('Variable "lineItem" does not exist.', 117, $this->source); })()), "identifier", [], "any", false, false, false, 117))]), "html", null, true);
                echo "\"
        >
            <i class=\"fas fa-undo-alt\"></i>&nbsp;Back to line item
        </a>
    ";
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['action'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 123
        echo "</div>
<script>
    \$(\".ags-line-item-action-";
        // line 125
        echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 125, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
        echo "\").click(function (event) {

        event.preventDefault();

        let run = true;
        let form = false;
        let btn = \$(this);

        if (\$(this).data(\"action\") === \"delete\") {
            run = confirm(\"Are you sure ?\");
        }

        if (\$(this).data(\"action\") === \"create\" || \$(this).data(\"action\") === \"update\") {
            form = \$('#lineItemEditForm-";
        // line 138
        echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 138, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
        echo "').serialize();
        }

        if (\$(this).data(\"action\") === \"publish-score\") {
            form = \$('#scoreSendForm-";
        // line 142
        echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 142, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
        echo "').serialize();
        }

        if (run) {
            \$.ajax({
                url: btn.data(\"line-item-url\"),
                method: \"GET\",
                data: {
                    registration: btn.data(\"registration\"),
                    form: form,
                    mode: \"";
        // line 152
        echo twig_escape_filter($this->env, (isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 152, $this->source); })()), "html", null, true);
        echo "\",
                    scopes: \"";
        // line 153
        echo twig_escape_filter($this->env, (isset($context["scopes"]) || array_key_exists("scopes", $context) ? $context["scopes"] : (function () { throw new RuntimeError('Variable "scopes" does not exist.', 153, $this->source); })()), "html", null, true);
        echo "\"
                },
                dataType: \"json\",
                beforeSend: function(result){
                    ";
        // line 157
        if (((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 157, $this->source); })()) == "line-item")) {
            // line 158
            echo "                        \$(\"#agsLineItemLogo\").removeClass(\"fa-square\");
                        \$(\"#agsLineItemLogo\").addClass(\"fa-spinner fa-spin\");
                        \$(\"#agsLineItemTitle\").html(\"Processing\");
                        \$(\"#agsLineItemFlashes\").html(\"\");
                        \$(\"#agsLineItemBody\").html(\"processing ...\");
                        \$(\"#agsLineItemActions\").html(\"\");
                    ";
        } else {
            // line 165
            echo "                        \$(\"#agsModalLogo\").removeClass(\"fa-square\");
                        \$(\"#agsModalLogo\").addClass(\"fa-spinner fa-spin\");
                        \$(\"#agsModal\").modal('show');
                        \$(\"#agsModalTitle\").html(\"Processing\");
                        \$(\"#agsModalFlashes\").html(\"\");
                        \$(\"#agsModalBody\").html(\"processing ...\");
                        \$(\"#agsModalActions-";
            // line 171
            echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 171, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
            echo "\").html(\"\");
                    ";
        }
        // line 173
        echo "                },
                success: function(result){
                    ";
        // line 175
        if (((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 175, $this->source); })()) == "line-item")) {
            // line 176
            echo "                        \$(\"#agsLineItemLogo\").removeClass(\"fa-spinner fa-spin\");
                        \$(\"#agsLineItemLogo\").addClass(\"fa-square\");
                        \$(\"#agsLineItemTitle\").html(result.title);
                        \$(\"#agsLineItemFlashes\").html(result.flashes);
                        \$(\"#agsLineItemBody\").html(result.body);
                        \$(\"#agsLineItemActions\").html(result.actions);
                        //\$('html, body').animate({scrollTop:\$(document).height()}, 'slow');
                    ";
        } else {
            // line 184
            echo "                        \$(\"#agsModalLogo\").removeClass(\"fa-spinner fa-spin\");
                        \$(\"#agsModalLogo\").addClass(\"fa-square\");
                        \$(\"#agsModalTitle\").html(result.title);
                        \$(\"#agsModalFlashes\").html(result.flashes);
                        \$(\"#agsModalBody\").html(result.body);
                        \$(\"#agsModalActions-";
            // line 189
            echo twig_escape_filter($this->env, ((array_key_exists("mode", $context)) ? (_twig_default_filter((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 189, $this->source); })()), "line-item-container")) : ("line-item-container")), "html", null, true);
            echo "\").html(result.actions);
                        if (btn.data(\"action\") === \"create\" || btn.data(\"action\") === \"delete\" || btn.data(\"action\") === \"update\") {
                            \$(\"#agsLoad\").click();
                        }
                    ";
        }
        // line 194
        echo "                }
            });
        }
    });
</script>";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "tool/ajax/ags/actionsLineItem.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  495 => 194,  487 => 189,  480 => 184,  470 => 176,  468 => 175,  464 => 173,  459 => 171,  451 => 165,  442 => 158,  440 => 157,  433 => 153,  429 => 152,  416 => 142,  409 => 138,  393 => 125,  389 => 123,  377 => 117,  373 => 116,  369 => 115,  365 => 114,  361 => 113,  357 => 112,  354 => 111,  351 => 110,  343 => 105,  339 => 104,  335 => 103,  331 => 102,  327 => 101,  323 => 100,  320 => 99,  317 => 98,  309 => 93,  305 => 92,  301 => 91,  297 => 90,  293 => 89,  289 => 88,  286 => 87,  283 => 86,  275 => 81,  271 => 80,  267 => 79,  263 => 78,  259 => 77,  255 => 76,  252 => 75,  249 => 74,  241 => 69,  237 => 68,  233 => 67,  229 => 66,  225 => 65,  221 => 64,  218 => 63,  215 => 62,  207 => 57,  203 => 56,  199 => 55,  195 => 54,  191 => 53,  188 => 52,  185 => 51,  177 => 46,  173 => 45,  169 => 44,  165 => 43,  161 => 42,  157 => 41,  154 => 40,  151 => 39,  143 => 34,  139 => 33,  135 => 32,  131 => 31,  127 => 30,  123 => 29,  120 => 28,  117 => 27,  109 => 22,  105 => 21,  101 => 20,  97 => 19,  93 => 18,  89 => 17,  86 => 16,  83 => 15,  75 => 10,  71 => 9,  67 => 8,  63 => 7,  59 => 6,  55 => 5,  52 => 4,  49 => 3,  45 => 2,  40 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div id=\"agsModalActions-{{ mode|default('line-item-container') }}\" class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">
{% for action in actions  %}
    {% if action == 'prepare-score' %}
        <button
                id=\"ags-line-item-prepare-score-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-info text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_prepare_score', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-poll\"></i>&nbsp;Publish score
        </button>
    {% endif %}
    {% if action == 'publish-score' %}
        <a
                id=\"ags-line-item-send-score-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-info text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_publish_score', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-poll\"></i>&nbsp;Publish score
        </a>
    {% endif %}
    {% if action == 'prepare-results' %}
        <a
                id=\"ags-line-item-prepare-results-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-info text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_prepare_results', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-poll-h\"></i>&nbsp;Get Results
        </a>
    {% endif %}
    {% if action == 'list-results' %}
        <a
                id=\"ags-line-item-list-results-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-info text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_list_results', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-poll-h\"></i>&nbsp;Get Results
        </a>
    {% endif %}
    {% if action == 'create' %}
        <a
                id=\"ags-line-item-create-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-primary text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_create_lineitem') }}\"
        >
            <i class=\"fas fa-save\"></i>&nbsp;Save
        </a>
    {% endif %}
    {% if action == 'edit' %}
        <a
                id=\"ags-line-item-edit-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-primary text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_prepare_update_lineitem', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-edit\"></i>&nbsp;Edit
        </a>
    {% endif %}
    {% if action == 'delete' %}
        <a
                id=\"ags-line-item-delete-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-danger text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_delete_lineitem', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-trash\"></i>&nbsp;Delete
        </a>
    {% endif %}
    {% if action == 'update' %}
        <a
                id=\"ags-line-item-update-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-primary text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_update_lineitem', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-save\"></i>&nbsp;Save
        </a>
    {% endif %}
    {% if action == 'cancel' %}
        <a
                id=\"ags-line-item-cancel-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-secondary text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_view_lineitem', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-undo-alt\"></i>&nbsp;Cancel
        </a>
    {% endif %}
    {% if action == 'go-back' %}
        <a
                id=\"ags-line-item-back-btn-{{ mode|default('line-item-container') }}\"
                class=\"btn btn-secondary text-white ags-line-item-action-{{ mode|default('line-item-container') }}\"
                data-action=\"{{ action }}\"
                data-registration=\"{{ registration.identifier }}\"
                data-line-item-identifier=\"{{ lineItem.identifier }}\"
                data-line-item-url=\"{{ path('tool_ajax_service_ags_view_lineitem', {'lineItemIdentifier': lineItem.identifier|base64_url_encode}) }}\"
        >
            <i class=\"fas fa-undo-alt\"></i>&nbsp;Back to line item
        </a>
    {% endif %}
{% endfor %}
</div>
<script>
    \$(\".ags-line-item-action-{{ mode|default('line-item-container') }}\").click(function (event) {

        event.preventDefault();

        let run = true;
        let form = false;
        let btn = \$(this);

        if (\$(this).data(\"action\") === \"delete\") {
            run = confirm(\"Are you sure ?\");
        }

        if (\$(this).data(\"action\") === \"create\" || \$(this).data(\"action\") === \"update\") {
            form = \$('#lineItemEditForm-{{ mode|default('line-item-container') }}').serialize();
        }

        if (\$(this).data(\"action\") === \"publish-score\") {
            form = \$('#scoreSendForm-{{ mode|default('line-item-container') }}').serialize();
        }

        if (run) {
            \$.ajax({
                url: btn.data(\"line-item-url\"),
                method: \"GET\",
                data: {
                    registration: btn.data(\"registration\"),
                    form: form,
                    mode: \"{{ mode }}\",
                    scopes: \"{{ scopes }}\"
                },
                dataType: \"json\",
                beforeSend: function(result){
                    {% if mode == 'line-item' %}
                        \$(\"#agsLineItemLogo\").removeClass(\"fa-square\");
                        \$(\"#agsLineItemLogo\").addClass(\"fa-spinner fa-spin\");
                        \$(\"#agsLineItemTitle\").html(\"Processing\");
                        \$(\"#agsLineItemFlashes\").html(\"\");
                        \$(\"#agsLineItemBody\").html(\"processing ...\");
                        \$(\"#agsLineItemActions\").html(\"\");
                    {% else %}
                        \$(\"#agsModalLogo\").removeClass(\"fa-square\");
                        \$(\"#agsModalLogo\").addClass(\"fa-spinner fa-spin\");
                        \$(\"#agsModal\").modal('show');
                        \$(\"#agsModalTitle\").html(\"Processing\");
                        \$(\"#agsModalFlashes\").html(\"\");
                        \$(\"#agsModalBody\").html(\"processing ...\");
                        \$(\"#agsModalActions-{{ mode|default('line-item-container') }}\").html(\"\");
                    {% endif %}
                },
                success: function(result){
                    {% if mode == 'line-item' %}
                        \$(\"#agsLineItemLogo\").removeClass(\"fa-spinner fa-spin\");
                        \$(\"#agsLineItemLogo\").addClass(\"fa-square\");
                        \$(\"#agsLineItemTitle\").html(result.title);
                        \$(\"#agsLineItemFlashes\").html(result.flashes);
                        \$(\"#agsLineItemBody\").html(result.body);
                        \$(\"#agsLineItemActions\").html(result.actions);
                        //\$('html, body').animate({scrollTop:\$(document).height()}, 'slow');
                    {% else %}
                        \$(\"#agsModalLogo\").removeClass(\"fa-spinner fa-spin\");
                        \$(\"#agsModalLogo\").addClass(\"fa-square\");
                        \$(\"#agsModalTitle\").html(result.title);
                        \$(\"#agsModalFlashes\").html(result.flashes);
                        \$(\"#agsModalBody\").html(result.body);
                        \$(\"#agsModalActions-{{ mode|default('line-item-container') }}\").html(result.actions);
                        if (btn.data(\"action\") === \"create\" || btn.data(\"action\") === \"delete\" || btn.data(\"action\") === \"update\") {
                            \$(\"#agsLoad\").click();
                        }
                    {% endif %}
                }
            });
        }
    });
</script>", "tool/ajax/ags/actionsLineItem.html.twig", "C:\\wamp64\\www\\devkit-lti1p3-master-tool\\templates\\tool\\ajax\\ags\\actionsLineItem.html.twig");
    }
}
