<?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;

/* launch/blocks/deepLinkingItemSelection.html.twig */
class __TwigTemplate_bcc9f9f6942d93a225079cc20e111075c7b1ec39eabc4186d77ad4cc75ed55b4 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", "launch/blocks/deepLinkingItemSelection.html.twig"));

        // line 1
        echo "<div class=\"alert alert-info\" role=\"alert\">
    <i class=\"fas fa-hand-point-down\"></i>&nbsp;Content item(s) selection mode:&nbsp;
    <span class=\"badge badge-pill badge-";
        // line 3
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 3, $this->source); })()), "payload", [], "any", false, false, false, 3), "deepLinkingSettings", [], "any", false, false, false, 3), "shouldAcceptMultiple", [], "any", false, false, false, 3)) ? ("primary") : ("secondary"));
        echo "\">
        ";
        // line 4
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 4, $this->source); })()), "payload", [], "any", false, false, false, 4), "deepLinkingSettings", [], "any", false, false, false, 4), "shouldAcceptMultiple", [], "any", false, false, false, 4)) ? ("multiple") : ("single"));
        echo "
    </span>
</div>
<form action=\"";
        // line 7
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_message_deep_linking_response");
        echo "\" method=\"post\">
    <div class=\"card bg-light\">
        <div class=\"card-header\">
            <i class=\"fas fa-link\"></i>&nbsp;Available content item(s)
        </div>
        <div class=\"card-body\">
            <div class=\"card-deck\">
                ";
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 14, $this->source); })()));
        foreach ($context['_seq'] as $context["resourceIdentifier"] => $context["resource"]) {
            // line 15
            echo "                    ";
            if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["resource"], "type", [], "any", false, false, false, 15), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 15, $this->source); })()), "payload", [], "any", false, false, false, 15), "deepLinkingSettings", [], "any", false, false, false, 15), "acceptedTypes", [], "any", false, false, false, 15))) {
                // line 16
                echo "                        <div class=\"card clickable content-item\">
                            <div class=\"card-header\">
                                <input type=\"checkbox\" name=\"selected-resources[]\" value=\"";
                // line 18
                echo twig_escape_filter($this->env, $context["resourceIdentifier"], "html", null, true);
                echo "\"/>
                                &nbsp;";
                // line 19
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["resource"], "title", [], "any", false, false, false, 19), "html", null, true);
                echo "
                            </div>
                            <div class=\"card-body\">
                                <small>
                                    <dl class=\"list-unstyled\">
                                        ";
                // line 24
                if (twig_get_attribute($this->env, $this->source, $context["resource"], "url", [], "any", true, true, false, 24)) {
                    // line 25
                    echo "                                            <dt>Url</dt>
                                            <dd><a href=\"";
                    // line 26
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["resource"], "url", [], "any", false, false, false, 26), "html", null, true);
                    echo "\" target=\"_blank\">";
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["resource"], "url", [], "any", false, false, false, 26), "html", null, true);
                    echo "</a></dd>
                                        ";
                }
                // line 28
                echo "                                        ";
                if (twig_get_attribute($this->env, $this->source, $context["resource"], "html", [], "any", true, true, false, 28)) {
                    // line 29
                    echo "                                            <dt>HTML</dt>
                                            <dd><kbd>";
                    // line 30
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["resource"], "html", [], "any", false, false, false, 30), "html", null, true);
                    echo "</kbd></dd>
                                        ";
                }
                // line 32
                echo "                                        <dt>Description</dt>
                                        <dd>";
                // line 33
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["resource"], "text", [], "any", false, false, false, 33), "html", null, true);
                echo "</dd>
                                        ";
                // line 34
                if (twig_get_attribute($this->env, $this->source, $context["resource"], "icon", [], "any", true, true, false, 34)) {
                    // line 35
                    echo "                                            <dt>Icon</dt>
                                            <dd><img height=\"20px\" width=\"20px\" src=\"";
                    // line 36
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["resource"], "icon", [], "any", false, false, false, 36), "url", [], "any", false, false, false, 36), "html", null, true);
                    echo "\"/></dd>
                                        ";
                }
                // line 38
                echo "                                    </dl>
                                </small>
                            </div>

                            <div class=\"card-footer\">
                                <small class=\"text-muted\">Type: <code>";
                // line 43
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["resource"], "type", [], "any", false, false, false, 43), "html", null, true);
                echo "</code></small>
                            </div>
                        </div>
                    ";
            }
            // line 47
            echo "                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['resourceIdentifier'], $context['resource'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 48
        echo "            </div>
            <input type=\"hidden\" name=\"registration\" value=\"";
        // line 49
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 49, $this->source); })()), "registration", [], "any", false, false, false, 49), "identifier", [], "any", false, false, false, 49), "html", null, true);
        echo "\"/>
            <input type=\"hidden\" name=\"deep-linking-return-url\" value=\"";
        // line 50
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 50, $this->source); })()), "payload", [], "any", false, false, false, 50), "deepLinkingSettings", [], "any", false, false, false, 50), "deepLinkingReturnUrl", [], "any", false, false, false, 50), "html", null, true);
        echo "\"/>
            <input type=\"hidden\" name=\"deep-linking-data\" value=\"";
        // line 51
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 51, $this->source); })()), "payload", [], "any", false, false, false, 51), "deepLinkingSettings", [], "any", false, false, false, 51), "data", [], "any", false, false, false, 51), "html", null, true);
        echo "\"/>
        </div>
        <div class=\"card-footer text-muted\">
            <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                <button type=\"submit\" id=\"deepLinkingSend\" class=\"btn-primary btn\">
                    <i class=\"fas fa-sign-in-alt\"></i>&nbsp;Return selected content item(s) to platform
                </button>
            </div>
        </div>
    </div>
</form>

<script>
    \$(\".content-item\").click(function(event){
        var multi = '";
        // line 65
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 65, $this->source); })()), "payload", [], "any", false, false, false, 65), "deepLinkingSettings", [], "any", false, false, false, 65), "shouldAcceptMultiple", [], "any", false, false, false, 65)) ? ("on") : ("off"));
        echo "';

        if (\$(this).find('input').prop('checked')) {
            \$(this).find('input').prop('checked', false);
            \$(this).removeClass('border-primary');
        } else {
            if (multi === 'off') {
                \$('.content-item').each(
                    function() {
                        \$(this).find('input').prop('checked', false);
                        \$(this).removeClass('border-primary')
                    }
                );
            }
            \$(this).find('input').prop('checked', true);
            \$(this).addClass('border-primary');
        }
    });
</script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "launch/blocks/deepLinkingItemSelection.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  175 => 65,  158 => 51,  154 => 50,  150 => 49,  147 => 48,  141 => 47,  134 => 43,  127 => 38,  122 => 36,  119 => 35,  117 => 34,  113 => 33,  110 => 32,  105 => 30,  102 => 29,  99 => 28,  92 => 26,  89 => 25,  87 => 24,  79 => 19,  75 => 18,  71 => 16,  68 => 15,  64 => 14,  54 => 7,  48 => 4,  44 => 3,  40 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div class=\"alert alert-info\" role=\"alert\">
    <i class=\"fas fa-hand-point-down\"></i>&nbsp;Content item(s) selection mode:&nbsp;
    <span class=\"badge badge-pill badge-{{ token.payload.deepLinkingSettings.shouldAcceptMultiple ? 'primary' : 'secondary' }}\">
        {{ token.payload.deepLinkingSettings.shouldAcceptMultiple ? 'multiple' : 'single' }}
    </span>
</div>
<form action=\"{{ path('tool_message_deep_linking_response') }}\" method=\"post\">
    <div class=\"card bg-light\">
        <div class=\"card-header\">
            <i class=\"fas fa-link\"></i>&nbsp;Available content item(s)
        </div>
        <div class=\"card-body\">
            <div class=\"card-deck\">
                {% for resourceIdentifier, resource in resources %}
                    {% if resource.type in token.payload.deepLinkingSettings.acceptedTypes %}
                        <div class=\"card clickable content-item\">
                            <div class=\"card-header\">
                                <input type=\"checkbox\" name=\"selected-resources[]\" value=\"{{ resourceIdentifier }}\"/>
                                &nbsp;{{ resource.title }}
                            </div>
                            <div class=\"card-body\">
                                <small>
                                    <dl class=\"list-unstyled\">
                                        {% if resource.url is defined %}
                                            <dt>Url</dt>
                                            <dd><a href=\"{{ resource.url }}\" target=\"_blank\">{{ resource.url }}</a></dd>
                                        {% endif %}
                                        {% if resource.html is defined %}
                                            <dt>HTML</dt>
                                            <dd><kbd>{{ resource.html }}</kbd></dd>
                                        {% endif %}
                                        <dt>Description</dt>
                                        <dd>{{ resource.text }}</dd>
                                        {% if resource.icon is defined %}
                                            <dt>Icon</dt>
                                            <dd><img height=\"20px\" width=\"20px\" src=\"{{ resource.icon.url }}\"/></dd>
                                        {% endif %}
                                    </dl>
                                </small>
                            </div>

                            <div class=\"card-footer\">
                                <small class=\"text-muted\">Type: <code>{{ resource.type }}</code></small>
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            </div>
            <input type=\"hidden\" name=\"registration\" value=\"{{ token.registration.identifier }}\"/>
            <input type=\"hidden\" name=\"deep-linking-return-url\" value=\"{{ token.payload.deepLinkingSettings.deepLinkingReturnUrl }}\"/>
            <input type=\"hidden\" name=\"deep-linking-data\" value=\"{{ token.payload.deepLinkingSettings.data }}\"/>
        </div>
        <div class=\"card-footer text-muted\">
            <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                <button type=\"submit\" id=\"deepLinkingSend\" class=\"btn-primary btn\">
                    <i class=\"fas fa-sign-in-alt\"></i>&nbsp;Return selected content item(s) to platform
                </button>
            </div>
        </div>
    </div>
</form>

<script>
    \$(\".content-item\").click(function(event){
        var multi = '{{ token.payload.deepLinkingSettings.shouldAcceptMultiple ? 'on' : 'off' }}';

        if (\$(this).find('input').prop('checked')) {
            \$(this).find('input').prop('checked', false);
            \$(this).removeClass('border-primary');
        } else {
            if (multi === 'off') {
                \$('.content-item').each(
                    function() {
                        \$(this).find('input').prop('checked', false);
                        \$(this).removeClass('border-primary')
                    }
                );
            }
            \$(this).find('input').prop('checked', true);
            \$(this).addClass('border-primary');
        }
    });
</script>
", "launch/blocks/deepLinkingItemSelection.html.twig", "C:\\wamp64\\www\\devkit-lti1p3-master-tool\\templates\\launch\\blocks\\deepLinkingItemSelection.html.twig");
    }
}
