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

/* RemisePayment4/Resource/template/sub_shopping_index_payquick.twig */
class __TwigTemplate_18d7ec4cbd12026df5492f71946e6052c8704e395521c14ea0631183f130582b extends \Eccube\Twig\Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<script>
    \$(function(){
        \$('input[name=\"_shopping_order[remise_payment4_use_payquick]\"]').change(function(){
            changeRemisePayment4UsePayquick();
        });
        \$('input[name=\"_shopping_order[remise_payment4_method]\"]').change(function(){
            changeRemisePayment4Method();
        });

        \$('.ec-orderPayment').first().after(\$('#remise_payment4_payquick'));

        ";
        // line 12
        if (($context["Payquick"] ?? null)) {
            // line 13
            echo "            ";
            if ((twig_get_attribute($this->env, $this->source, ($context["PayquickInfo"] ?? null), "use_payquick", [], "any", false, false, false, 13) == "1")) {
                // line 14
                echo "            \$('#shopping_order_remise_payment4_use_payquick_0').prop('checked', true);
            ";
            } else {
                // line 16
                echo "            \$('#shopping_order_remise_payment4_use_payquick_1').prop('checked', true);
            ";
            }
            // line 18
            echo "            ";
            if ((twig_get_attribute($this->env, $this->source, ($context["PayquickInfo"] ?? null), "regist_payquick", [], "any", false, false, false, 18) == "1")) {
                // line 19
                echo "            \$('#shopping_order_remise_payment4_regist_payquick_0').prop('checked', true);
            ";
            }
            // line 21
            echo "            ";
            if (twig_get_attribute($this->env, $this->source, ($context["PayquickInfo"] ?? null), "method", [], "any", false, false, false, 21)) {
                // line 22
                echo "            \$('input[name=\"_shopping_order[remise_payment4_method]\"]').each(function(){
                if (\$(this).val() == '";
                // line 23
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["PayquickInfo"] ?? null), "method", [], "any", false, false, false, 23), "html", null, true);
                echo "') {
                    \$(this).prop('checked', true);
                }
            });
            ";
            }
            // line 28
            echo "        ";
        } else {
            // line 29
            echo "            ";
            if ((twig_get_attribute($this->env, $this->source, ($context["PayquickInfo"] ?? null), "regist_payquick", [], "any", false, false, false, 29) == "1")) {
                // line 30
                echo "            \$('#shopping_order_remise_payment4_regist_payquick_0').prop('checked', true);
            ";
            }
            // line 32
            echo "        ";
        }
        // line 33
        echo "
        changeRemisePayment4UsePayquick();
        changeRemisePayment4Method();
    });
    function changeRemisePayment4UsePayquick() {
        if (\$('#shopping_order_remise_payment4_use_payquick_0').prop('checked')) {
            \$('#shopping_order_remise_payment4_regist_payquick_0').prop('checked', true);
            \$('#shopping_order_remise_payment4_regist_payquick_0').attr('disabled', true);
        }
        else if (\$('#shopping_order_remise_payment4_use_payquick_1').prop('checked')) {
            \$('#shopping_order_remise_payment4_regist_payquick_0').attr('disabled', false);
        }
    }
    function changeRemisePayment4Method() {
        var isPtimes = false;
        \$('input[name=\"_shopping_order[remise_payment4_method]\"]').each(function(){
            if (\$(this).val() == \"61\" && \$(this).prop('checked')) {
                isPtimes = true;
            }
        });
        if (isPtimes) {
            \$('#shopping_order_remise_payment4_ptimes').attr('disabled', false);
            \$('#shopping_order_remise_payment4_ptimes').css('background-color', '');
        } else {
            \$('#shopping_order_remise_payment4_ptimes').attr('disabled', true);
            \$('#shopping_order_remise_payment4_ptimes').css('background-color', '#f0f0f0');
        }
    }
</script>
<div class=\"d-none\">
    <div id=\"remise_payment4_payquick\" class=\"ec-orderPayment\">
        <div class=\"ec-rectHeading\">
            <h2>";
        // line 65
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("remise_payment4.front.label.card_info"), "html", null, true);
        echo "</h2>
        </div>
        ";
        // line 67
        if (($context["Payquick"] ?? null)) {
            // line 68
            echo "        <div class=\"ec-radio\">
            ";
            // line 69
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "remise_payment4_use_payquick", [], "any", false, false, false, 69)) && is_array($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) || $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 instanceof ArrayAccess ? ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4[0] ?? null) : null), 'widget');
            echo "
            <div id=\"shopping_order_remise_payment4_use_payquick_info\">
                <div>
                    <label>";
            // line 72
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("remise_payment4.common.label.card"), "html", null, true);
            echo "</label>
                    <span class=\"form-control\">";
            // line 73
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["Payquick"] ?? null), "getDispCardParts", [], "any", false, false, false, 73), "html", null, true);
            echo "</span>
                </div>
                <div>
                    <label>";
            // line 76
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("remise_payment4.common.label.expire"), "html", null, true);
            echo "</label>
                    <span class=\"form-control\">";
            // line 77
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["Payquick"] ?? null), "getDispExpire", [], "any", false, false, false, 77), "html", null, true);
            echo "</span>
                </div>
            </div>
            ";
            // line 80
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 = twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "remise_payment4_use_payquick", [], "any", false, false, false, 80)) && is_array($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144) || $__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 instanceof ArrayAccess ? ($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144[1] ?? null) : null), 'widget');
            echo "
        </div>
        <hr class=\"borderline\"/>
        <div class=\"ec-radio\">
            <label for=\"shopping_order_remise_payment4_regist_payquick_0\">
                ";
            // line 85
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "remise_payment4_regist_payquick", [], "any", false, false, false, 85), 'widget');
            echo "
            </label>
        </div>
        <hr class=\"borderline\"/>
        <div class=\"ec-radio\">
            <label>";
            // line 90
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("remise_payment4.front.label.method"), "html", null, true);
            echo "</label>
            ";
            // line 91
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["useMethod"] ?? null));
            $context['loop'] = [
              'parent' => $context['_parent'],
              'index0' => 0,
              'index'  => 1,
              'first'  => true,
            ];
            if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                $length = count($context['_seq']);
                $context['loop']['revindex0'] = $length - 1;
                $context['loop']['revindex'] = $length;
                $context['loop']['length'] = $length;
                $context['loop']['last'] = 1 === $length;
            }
            foreach ($context['_seq'] as $context["key"] => $context["item"]) {
                // line 92
                echo "            <div style=\"display: block;\">
                <input type=\"radio\" id=\"shopping_order_remise_payment4_method_";
                // line 93
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 93), "html", null, true);
                echo "\" name=\"_shopping_order[remise_payment4_method]\" value=\"";
                echo twig_escape_filter($this->env, $context["item"], "html", null, true);
                echo "\">
                <label for=\"shopping_order_remise_payment4_method_";
                // line 94
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 94), "html", null, true);
                echo "\">
                    <span>";
                // line 95
                echo twig_escape_filter($this->env, $context["key"], "html", null, true);
                echo "</span>
                    ";
                // line 96
                if (($context["item"] == "61")) {
                    // line 97
                    echo "                    <select id=\"shopping_order_remise_payment4_ptimes\" name=\"_shopping_order[remise_payment4_ptimes]\">
                        ";
                    // line 98
                    $context['_parent'] = $context;
                    $context['_seq'] = twig_ensure_traversable(($context["usePtimes"] ?? null));
                    foreach ($context['_seq'] as $context["key2"] => $context["item2"]) {
                        // line 99
                        echo "                        <option value=\"";
                        echo twig_escape_filter($this->env, $context["item2"], "html", null, true);
                        echo "\">";
                        echo twig_escape_filter($this->env, $context["key2"], "html", null, true);
                        echo "</option>
                        ";
                    }
                    $_parent = $context['_parent'];
                    unset($context['_seq'], $context['_iterated'], $context['key2'], $context['item2'], $context['_parent'], $context['loop']);
                    $context = array_intersect_key($context, $_parent) + $_parent;
                    // line 101
                    echo "                    </select>
                    ";
                }
                // line 103
                echo "                </label>
            </div>
            ";
                ++$context['loop']['index0'];
                ++$context['loop']['index'];
                $context['loop']['first'] = false;
                if (isset($context['loop']['length'])) {
                    --$context['loop']['revindex0'];
                    --$context['loop']['revindex'];
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['key'], $context['item'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 106
            echo "        </div>

        ";
        } else {
            // line 109
            echo "        <div class=\"ec-radio\">
            <div style=\"display: block;\">
                ";
            // line 111
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "remise_payment4_regist_payquick", [], "any", false, false, false, 111), 'widget');
            echo "
            </div>
        </div>
        <div id=\"shopping_order_remise_payment4_regist_payquick_memo\" class=\"text-primary small clearboth\">
            ";
            // line 115
            echo nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("remise_payment4.front.text.payquick"), "html", null, true));
            echo "
        </div>
        ";
        }
        // line 118
        echo "    </div>
</div>
";
    }

    public function getTemplateName()
    {
        return "RemisePayment4/Resource/template/sub_shopping_index_payquick.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  283 => 118,  277 => 115,  270 => 111,  266 => 109,  261 => 106,  245 => 103,  241 => 101,  230 => 99,  226 => 98,  223 => 97,  221 => 96,  217 => 95,  213 => 94,  207 => 93,  204 => 92,  187 => 91,  183 => 90,  175 => 85,  167 => 80,  161 => 77,  157 => 76,  151 => 73,  147 => 72,  141 => 69,  138 => 68,  136 => 67,  131 => 65,  97 => 33,  94 => 32,  90 => 30,  87 => 29,  84 => 28,  76 => 23,  73 => 22,  70 => 21,  66 => 19,  63 => 18,  59 => 16,  55 => 14,  52 => 13,  50 => 12,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "RemisePayment4/Resource/template/sub_shopping_index_payquick.twig", "/home/probiotech2/www/mamebio/app/Plugin/RemisePayment4/Resource/template/sub_shopping_index_payquick.twig");
    }
}
