<?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/redirect.twig */
class __TwigTemplate_a658d5b3460011bdc3ea266036d634d0a6f910503d851d00270002b10186ef17 extends \Eccube\Twig\Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'stylesheet' => [$this, 'block_stylesheet'],
            'javascript' => [$this, 'block_javascript'],
            'main' => [$this, 'block_main'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "default_frame.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $this->parent = $this->loadTemplate("default_frame.twig", "@RemisePayment4/redirect.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_stylesheet($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 4
        echo "    <style type=\"text/css\">
        #dialog-overlay {
            width:100%;height:100%;
            filter:alpha(opacity=50);
            -moz-opacity:0.5;
            -khtml-opacity: 0.5;
            opacity: 0.5;
            background:#000;
            position:absolute;
            top:0;left:0;
            z-index:99;
            display:none;
        }
        #dialog-box {
            -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
            -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
            background:#eee;
            width:350px;
            height:200px;
            position:absolute;
            z-index:999;
            display:none;
        }
        #dialog-box .dialog-content {
            text-align:center;
            vertical-align: middle;
            margin:70px; padding:10px 5px;
            color:#666;
        }
    </style>
";
    }

    // line 36
    public function block_javascript($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 37
        echo "    <script>
        var wait = false;
        \$(function(){
            document.charset = \"Shift_JIS\";

            \$(window).resize(function(){
                if (!\$('#dialog-box').is(':hidden')) {
                    waitscreen();
                }
            });

            remiseSubmit();
        });

        function remiseSubmit() {
            if (wait) {
                return false;
            }
            wait = true;
            waitscreen();
            document.cardform.submit();
        }

        function waitscreen() {
            var maskHeight = \$(document).height();
            var maskWidth = \$(window).width();
            var dialogTop =  (\$(window).height()/2) - (\$('#dialog-box').height());
            var dialogLeft = (maskWidth/2) - (\$('#dialog-box').width()/2);
            \$('#dialog-overlay').css({height:maskHeight, width:maskWidth}).show();
            \$('#dialog-box').css({top:dialogTop, left:dialogLeft}).show();
            \$('#dialog-message').html();
            scroll(0,0);
        }
    </script>
";
    }

    // line 73
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 74
        echo "    <div id=\"dialog-overlay\"></div>
    <div id=\"dialog-box\">
       <div class=\"dialog-content\">
          <div id=\"dialog-message\">";
        // line 77
        echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("remise_payment4.front.text.processing");
        echo "</div>
       </div>
    </div>

    <form name=\"cardform\" id=\"cardform\" method=\"post\" action=\"";
        // line 81
        echo nl2br(twig_escape_filter($this->env, ($context["send_url"] ?? null), "html", null, true));
        echo "\" autocomplete=\"off\" accept-charset=\"Shift_JIS\">
        ";
        // line 82
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["send_data"] ?? null));
        foreach ($context['_seq'] as $context["key"] => $context["item"]) {
            // line 83
            echo "        <input type=\"hidden\" name=\"";
            echo nl2br(twig_escape_filter($this->env, $context["key"], "html", null, true));
            echo "\" value=\"";
            echo nl2br(twig_escape_filter($this->env, $context["item"], "html", null, true));
            echo "\">
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 85
        echo "    </form>
";
    }

    public function getTemplateName()
    {
        return "@RemisePayment4/redirect.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  163 => 85,  152 => 83,  148 => 82,  144 => 81,  137 => 77,  132 => 74,  128 => 73,  90 => 37,  86 => 36,  52 => 4,  48 => 3,  37 => 1,);
    }

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