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

/* @PrestaShop/Admin/Common/Grid/Columns/Content/order_packlink_draft_action.html.twig */
class __TwigTemplate_e99976d969a1a85246aedbab11020ac9 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@PrestaShop/Admin/Common/Grid/Columns/Content/order_packlink_draft_action.html.twig"));

        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@PrestaShop/Admin/Common/Grid/Columns/Content/order_packlink_draft_action.html.twig"));

        // line 1
        echo "<span class=\"btn-group-action pl-grid-draft-container\">
    <span class=\"btn-group\">
        ";
        // line 3
        if ((twig_get_attribute($this->env, $this->source, (isset($context["record"]) || array_key_exists("record", $context) ? $context["record"] : (function () { throw new RuntimeError('Variable "record" does not exist.', 3, $this->source); })()), "draftStatus", [], "any", false, false, false, 3) == "completed")) {
            // line 4
            echo "            <a class=\"btn btn-default pl-draft-button
          ";
            // line 5
            if (twig_get_attribute($this->env, $this->source, (isset($context["record"]) || array_key_exists("record", $context) ? $context["record"] : (function () { throw new RuntimeError('Variable "record" does not exist.', 5, $this->source); })()), "draftDeleted", [], "any", false, false, false, 5)) {
                // line 6
                echo "          pl-draft-button-disabled\"
        ";
            } else {
                // line 7
                echo "\"
            href=\"";
                // line 8
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["record"]) || array_key_exists("record", $context) ? $context["record"] : (function () { throw new RuntimeError('Variable "record" does not exist.', 8, $this->source); })()), "draftLink", [], "any", false, false, false, 8), "html", null, true);
                echo "\"
            target=\"_blank\"
        ";
            }
            // line 11
            echo "          >
          <img
                class=\"pl-image\"
                src=\"";
            // line 14
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["grid"]) || array_key_exists("grid", $context) ? $context["grid"] : (function () { throw new RuntimeError('Variable "grid" does not exist.', 14, $this->source); })()), "data", [], "any", false, false, false, 14), "packlinkLogo", [], "any", false, false, false, 14), "html", null, true);
            echo "\"
                alt=\"";
            // line 15
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Packlink order draft", [], "Modules.Packlink.Admin"), "html", null, true);
            echo "\"
        >
            <span>";
            // line 17
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("View on Packlink", [], "Modules.Packlink.Admin"), "html", null, true);
            echo "</span>
            </a>
        ";
        } elseif ((twig_get_attribute($this->env, $this->source,         // line 19
(isset($context["record"]) || array_key_exists("record", $context) ? $context["record"] : (function () { throw new RuntimeError('Variable "record" does not exist.', 19, $this->source); })()), "draftStatus", [], "any", false, false, false, 19) == "queued")) {
            // line 20
            echo "            <span
                    class=\"pl-draft-in-progress\"
                    data-order-id=\"";
            // line 22
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["record"]) || array_key_exists("record", $context) ? $context["record"] : (function () { throw new RuntimeError('Variable "record" does not exist.', 22, $this->source); })()), "id_order", [], "any", false, false, false, 22), "html", null, true);
            echo "\"
                    data-draft-status-url=\"{html_entity_decode(\$draftStatusUrl|escape:'html':'UTF-8')}\"
            >
              ";
            // line 25
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Draft is currently being created.", [], "Modules.Packlink.Admin"), "html", null, true);
            echo "
          </span>
        ";
        } else {
            // line 28
            echo "            <a
                    class=\"btn btn-default pl-create-draft-button\"
                    data-order-id=\"";
            // line 30
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["record"]) || array_key_exists("record", $context) ? $context["record"] : (function () { throw new RuntimeError('Variable "record" does not exist.', 30, $this->source); })()), "id_order", [], "any", false, false, false, 30), "html", null, true);
            echo "\"
            >
              <img
                      class=\"pl-image\"
                      src=\"";
            // line 34
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["grid"]) || array_key_exists("grid", $context) ? $context["grid"] : (function () { throw new RuntimeError('Variable "grid" does not exist.', 34, $this->source); })()), "data", [], "any", false, false, false, 34), "packlinkLogo", [], "any", false, false, false, 34), "html", null, true);
            echo "\"
                      alt=\"";
            // line 35
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Packlink order draft", [], "Modules.Packlink.Admin"), "html", null, true);
            echo "\"
              >
              <span>";
            // line 37
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Send with Packlink", [], "Modules.Packlink.Admin"), "html", null, true);
            echo "</span>
          </a>
        ";
        }
        // line 40
        echo "    </span>
</span>";
        
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);

        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    public function getTemplateName()
    {
        return "@PrestaShop/Admin/Common/Grid/Columns/Content/order_packlink_draft_action.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  130 => 40,  124 => 37,  119 => 35,  115 => 34,  108 => 30,  104 => 28,  98 => 25,  92 => 22,  88 => 20,  86 => 19,  81 => 17,  76 => 15,  72 => 14,  67 => 11,  61 => 8,  58 => 7,  54 => 6,  52 => 5,  49 => 4,  47 => 3,  43 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<span class=\"btn-group-action pl-grid-draft-container\">
    <span class=\"btn-group\">
        {% if record.draftStatus == 'completed' %}
            <a class=\"btn btn-default pl-draft-button
          {% if record.draftDeleted %}
          pl-draft-button-disabled\"
        {% else %}\"
            href=\"{{ record.draftLink }}\"
            target=\"_blank\"
        {% endif %}
          >
          <img
                class=\"pl-image\"
                src=\"{{ grid.data.packlinkLogo }}\"
                alt=\"{{ 'Packlink order draft'|trans({}, 'Modules.Packlink.Admin') }}\"
        >
            <span>{{ 'View on Packlink'|trans({}, 'Modules.Packlink.Admin') }}</span>
            </a>
        {%  elseif record.draftStatus == 'queued' %}
            <span
                    class=\"pl-draft-in-progress\"
                    data-order-id=\"{{ record.id_order }}\"
                    data-draft-status-url=\"{html_entity_decode(\$draftStatusUrl|escape:'html':'UTF-8')}\"
            >
              {{ 'Draft is currently being created.'|trans({}, 'Modules.Packlink.Admin') }}
          </span>
        {% else %}
            <a
                    class=\"btn btn-default pl-create-draft-button\"
                    data-order-id=\"{{ record.id_order }}\"
            >
              <img
                      class=\"pl-image\"
                      src=\"{{ grid.data.packlinkLogo }}\"
                      alt=\"{{ 'Packlink order draft'|trans({}, 'Modules.Packlink.Admin') }}\"
              >
              <span>{{ 'Send with Packlink'|trans({}, 'Modules.Packlink.Admin') }}</span>
          </a>
        {% endif %}
    </span>
</span>", "@PrestaShop/Admin/Common/Grid/Columns/Content/order_packlink_draft_action.html.twig", "/home/girardtosk/balledegolf/modules/packlink/views/PrestaShop/Admin/Common/Grid/Columns/Content/order_packlink_draft_action.html.twig");
    }
}
