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

/* extension/module/d_quickcheckout.twig */
class __TwigTemplate_56aeb569ed1445e5fc929e5c7023be99f1b8958c264852b630a030ec679cb77e extends \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 2
        echo "
";
        // line 3
        echo ($context["header"] ?? null);
        echo " ";
        echo ($context["column_left"] ?? null);
        echo " 

<div id=\"content\">
    <div class=\"page-header\">
        <div class=\"container-fluid\">
            <div class=\"form-inline pull-right\">

                <button id=\"save_and_stay\" data-toggle=\"tooltip\" title=\"";
        // line 10
        echo ($context["button_save_and_stay"] ?? null);
        echo "\" class=\"btn btn-success\"><i class=\"fa fa-save\"></i></button>

                <button type=\"submit\" form=\"form\" data-toggle=\"tooltip\" title=\"";
        // line 12
        echo ($context["button_save"] ?? null);
        echo "\" class=\"btn btn-primary\"><i class=\"fa fa-save\"></i></button>

                <a href=\"";
        // line 14
        echo ($context["cancel"] ?? null);
        echo "\" data-toggle=\"tooltip\" title=\"";
        echo ($context["button_cancel"] ?? null);
        echo "\" class=\"btn btn-default\"><i class=\"fa fa-reply\"></i></a>
            </div>
            <h1>";
        // line 16
        echo ($context["heading_title"] ?? null);
        echo " ";
        echo ($context["version"] ?? null);
        echo "</h1>
            <ul class=\"breadcrumb\">
                ";
        // line 18
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["breadcrumbs"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["breadcrumb"]) {
            echo " 
                    <li><a href=\"";
            // line 19
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "href", [], "any", false, false, false, 19);
            echo "\">";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "text", [], "any", false, false, false, 19);
            echo "</a></li>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['breadcrumb'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 20
        echo " 
            </ul>
        </div>
    </div>
    <div class=\"container-fluid\">
        ";
        // line 25
        if ( !($context["pro"] ?? null)) {
            // line 26
            echo "            <div class=\"notify alert alert-info\">";
            echo ($context["text_get_pro"] ?? null);
            echo "</div>
        ";
        }
        // line 28
        echo "        ";
        if (twig_get_attribute($this->env, $this->source, ($context["error"] ?? null), "warning", [], "any", false, false, false, 28)) {
            echo " 
            <div class=\"alert alert-danger\"><i class=\"fa fa-exclamation-circle\"></i> ";
            // line 29
            echo twig_get_attribute($this->env, $this->source, ($context["error"] ?? null), "warning", [], "any", false, false, false, 29);
            echo " 
                <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
            </div>
        ";
        }
        // line 32
        echo " 
        ";
        // line 33
        if (($context["success"] ?? null)) {
            echo " 
            <div class=\"alert alert-success\"><i class=\"fa fa-exclamation-circle\"></i> ";
            // line 34
            echo ($context["success"] ?? null);
            echo " 
                <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
            </div>
        ";
        }
        // line 37
        echo " 

        ";
        // line 39
        if (($context["d_shopunity"] ?? null)) {
            // line 40
            echo "            <div class=\"d_shopunity_update\"></div>
            <script src=\"view/javascript/d_shopunity/d_shopunity_widget.js\" type=\"text/javascript\"></script>
            <script type=\"text/javascript\">
            var d_shopunity_update = jQuery.extend(true, {}, d_shopunity_widget);
            d_shopunity_update.init({
            class: '.d_shopunity_update',
            token: '";
            // line 46
            echo ($context["token"] ?? null);
            echo "',
            extension_id: 'd_quickcheckout',
            action: 'loadUpdate'
            })
            </script>
        ";
        }
        // line 52
        echo "        ";
        if ((( !($context["pro"] ?? null) && ($context["settings"] ?? null)) && ($context["d_shopunity"] ?? null))) {
            // line 53
            echo "            <div class=\"row\">
                <div class=\"col-md-9\">
        ";
        }
        // line 56
        echo "        
        <div class=\"panel panel-default\">
            <div class=\"panel-heading\">
                <h3 class=\"panel-title\"><i class=\"fa fa-pencil\"></i> ";
        // line 59
        echo ($context["text_edit"] ?? null);
        echo "</h3>
            </div>
            <div class=\"panel-body\">
                
                    ";
        // line 71
        echo "
                    ";
        // line 72
        if (($context["settings"] ?? null)) {
            // line 73
            echo "
                        <div class=\"tab-content\">
                            <div class=\"tab-pane active\" id=\"tab_setting\" >
                                <div class=\"tab-body\">
                                    
                                    <form action=\"";
            // line 78
            echo ($context["action"] ?? null);
            echo "\" method=\"post\" enctype=\"multipart/form-data\" id=\"form\" class=\"form-horizontal\">
                                        
                                        ";
            // line 80
            if (twig_test_empty(($context["settings"] ?? null))) {
                // line 81
                echo "                                            <div class=\"form-group\">
                                                <label class=\"col-sm-2 control-label\" for=\"input_status\">Add setting</label>
                                                <div class=\"col-sm-10\">                                     
                                                    <a class=\"btn btn-success addSetting\" ><i class=\"fa fa-plus\"></i> Add Setting</a>
                                                </div>
                                            </div><!-- //editor -->
                                        ";
            }
            // line 88
            echo "
                                        ";
            // line 89
            if (($context["settings"] ?? null)) {
                // line 90
                echo "
                                        

                                        <div class=\"form-group\">
                                            <label class=\"col-sm-2 control-label\" for=\"input_status\">Visual Editor</label>
                                            <div class=\"col-md-10\">   

                                                <div class=\"form-inline\">
                                                    ";
                // line 98
                if ((twig_length_filter($this->env, ($context["stores"] ?? null)) > 1)) {
                    echo " 
                                                        <select class=\"form-control changeStore\">  
                                                            ";
                    // line 100
                    $context['_parent'] = $context;
                    $context['_seq'] = twig_ensure_traversable(($context["stores"] ?? null));
                    foreach ($context['_seq'] as $context["_key"] => $context["store"]) {
                        // line 101
                        echo "                                                                <option value=\"";
                        echo twig_get_attribute($this->env, $this->source, $context["store"], "store_id", [], "any", false, false, false, 101);
                        echo "\">";
                        echo twig_get_attribute($this->env, $this->source, $context["store"], "name", [], "any", false, false, false, 101);
                        echo "</option>
                                                            ";
                    }
                    $_parent = $context['_parent'];
                    unset($context['_seq'], $context['_iterated'], $context['_key'], $context['store'], $context['_parent'], $context['loop']);
                    $context = array_intersect_key($context, $_parent) + $_parent;
                    // line 103
                    echo "                                                         </select>
                                                    ";
                }
                // line 105
                echo "
                                                    <input type=\"hidden\" id=\"setting_id\" value=\"";
                // line 106
                echo twig_get_attribute($this->env, $this->source, (($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = ($context["settings"] ?? null)) && is_array($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) || $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 instanceof ArrayAccess ? ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4[0] ?? null) : null), "setting_id", [], "any", false, false, false, 106);
                echo "\" />
                                                    <a class=\"btn btn-primary editor\" href=\"";
                // line 107
                echo ($context["editor"] ?? null);
                echo "\" ><i class=\"fa fa-pencil\"></i> Go to Visual Editor</a>
                                                </div>
                                            </div>
                                        </div>

                                        

                                        <br/>
                                        <br/>
                                        <hr/>
                                        ";
            }
            // line 118
            echo "
                                        

                                        <div class=\"form-group\">
                                            <label class=\"col-sm-2 control-label\" for=\"input_status\">";
            // line 122
            echo ($context["entry_status"] ?? null);
            echo "</label>
                                            <div class=\"col-sm-10\">                                     
                                                <input type=\"hidden\" name=\"";
            // line 124
            echo ($context["codename"] ?? null);
            echo "_status\" value=\"0\" />
                                                <input type=\"checkbox\" name=\"";
            // line 125
            echo ($context["codename"] ?? null);
            echo "_status\" class=\"switcher\" data-label-text=\"";
            echo ($context["text_enabled"] ?? null);
            echo "\"id=\"input_status\"  ";
            echo ((twig_get_attribute($this->env, $this->source, $context, (($context["codename"] ?? null) . "_status"), [], "any", false, false, false, 125)) ? ("checked=\"checked\"") : (""));
            echo " value=\"1\" />
                                            </div>
                                        </div><!-- //status -->

                                        <div class=\"form-group\">
                                            <label class=\"col-sm-2 control-label\" for=\"input_rtl\">";
            // line 130
            echo ($context["entry_rtl"] ?? null);
            echo "</label>
                                            <div class=\"col-sm-10\">                                     
                                                <input type=\"hidden\" name=\"";
            // line 132
            echo ($context["codename"] ?? null);
            echo "_rtl\" value=\"0\" />
                                                <input type=\"checkbox\" name=\"";
            // line 133
            echo ($context["codename"] ?? null);
            echo "_rtl\" class=\"switcher\" data-label-text=\"";
            echo ($context["text_enabled"] ?? null);
            echo "\" id=\"input_rtl\"  ";
            echo ((twig_get_attribute($this->env, $this->source, $context, (($context["codename"] ?? null) . "_rtl"), [], "any", false, false, false, 133)) ? ("checked=\"checked\"") : (""));
            echo " value=\"1\" />
                                            </div>
                                        </div><!-- //rtl -->

                                        <div class=\"form-group\">
                                            <label class=\"col-sm-2 control-label\" for=\"input_status\">";
            // line 138
            echo ($context["entry_support"] ?? null);
            echo "</label>
                                            <div class=\"col-sm-10\">                                     
                                                <a class=\"btn btn-success\" href=\"https://dreamvention.ee/support\" target=\"_blank\">";
            // line 140
            echo ($context["text_support"] ?? null);
            echo "</a>
                                            </div>
                                        </div><!-- //status -->

                                        <div style=\"text-align: center; padding: 30px;\">";
            // line 144
            echo ($context["text_powered_by"] ?? null);
            echo "</div>
                                    </form>

                                </div>
                                
                            </div>
                            
                        </div>

                    ";
        } else {
            // line 154
            echo "<style>
.welcome{
    background: url('view/image/d_quickcheckout/bg.svg');
    background-position: bottom;
    background-repeat: repeat-x;
    background-size: 50%;
    min-height: 700px;
    padding-top: 50px;
    padding-bottom: 200px;
}
.welcome-into{
    text-align: center;
    max-width: 500px;
    margin: auto;
}
.welcome-into-logo{
    padding-bottom: 15px;
}
.welcome-into-heading{
    font-size: 30px;
    font-weight: bold;
    padding-bottom: 15px;
}
.welcome-into-text{
    font-size: 18px;
    padding-bottom: 30px;
}
.welcome-into-start{
    padding-bottom: 30px;
}
.welcome-features{
    padding: 30px;
}
.welcome-features-icon{
    padding: 20px;
    height: 130px;
    text-align: center;
}
.welcome-features-text{
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}
.panel .panel-body{
    padding: 0px;
}
</style>
                        <div class=\"welcome\">
                            <div class=\"welcome-into\">
                                <div class=\"welcome-into-logo\"><img src=\"view/image/d_quickcheckout/logo.svg\" /></div>
                                <div class=\"welcome-into-heading\">Ajax Quick Checkout</div>
                                <div class=\"welcome-into-text\">You are losing 67% of sales when you use the default checkout. We have developed the best checkout editor for you to customize so that your customers could enjoy buying and you could start selling more.</div>

                                <div class=\"welcome-into-start\">
                                    <a class=\"btn btn-primary btn-lg addSetting\">Setup</a>
                                </div>
                            </div>
                            <div class=\"welcome-features\">
                                <div class=\"row\">
                                    ";
            // line 217
            echo "                                    <div class=\"col-md-3\">
                                        <div class=\"welcome-features-icon\"><img src=\"view/image/d_quickcheckout/icons/visual-editor.svg\" /></div>
                                        <div class=\"welcome-features-text\">Customize with <br/>Visual editor</div>
                                    </div>
                                    <div class=\"col-md-3\">
                                        <div class=\"welcome-features-icon\"><img src=\"view/image/d_quickcheckout/icons/extensible.svg\" /></div>
                                        <div class=\"welcome-features-text\">Extend with <br/>plugins</div>
                                    </div>
                                    <div class=\"col-md-3\">
                                        <div class=\"welcome-features-icon\"><img src=\"view/image/d_quickcheckout/icons/mulipage.svg\" /></div>
                                        <div class=\"welcome-features-text\">Add One Page or <br/>Multiple pages</div>
                                    </div>
                                    ";
            // line 233
            echo "                                    ";
            // line 237
            echo "                                    
                                    <div class=\"col-md-3\">
                                        <div class=\"welcome-features-icon\"><img src=\"view/image/d_quickcheckout/icons/themes.svg\" /></div>
                                        <div class=\"welcome-features-text\">Add Themes & Layouts</div>
                                    </div>
                                    ";
            // line 246
            echo "                                    
                                </div>
                            </div>
                        </div>

                    ";
        }
        // line 252
        echo "                </div>
            </div>

            ";
        // line 255
        if ((( !($context["pro"] ?? null) && ($context["settings"] ?? null)) && ($context["d_shopunity"] ?? null))) {
            // line 256
            echo "                </div>

                <div class=\"col-md-3\">
                    <div class=\"d_shopunity_widget\"></div>
                    <script src=\"view/javascript/d_shopunity/d_shopunity_widget.js\" type=\"text/javascript\"></script>
                    <script type=\"text/javascript\">
                    var d_shopunity_widget = jQuery.extend(true, {}, d_shopunity_widget);
                    d_shopunity_widget.init({
                    class: '.d_shopunity_widget',
                    token: '";
            // line 265
            echo ($context["token"] ?? null);
            echo "',
                    extension_id: 'd_quickcheckout_pack'
                    })
                    </script>
                </div>
            </div>
        ";
        }
        // line 272
        echo "    </div>
</div>
<script type=\"text/javascript\"><!--
\$(function () {
    //checkbox
    \$(\".switcher[type='checkbox']\").bootstrapSwitch({
        'onColor': 'success',
        'onText': '";
        // line 279
        echo ($context["text_yes"] ?? null);
        echo "',
        'offText': '";
        // line 280
        echo ($context["text_no"] ?? null);
        echo "',
    });

    \$(document).on('click', '#save_and_stay', function(){
        \$.ajax( {
            type: 'post',
            url: \$('#form').attr('action') + '&save',
            data: \$('#form').serialize(),
            beforeSend: function() {
                \$('#form').fadeTo('slow', 0.5);
            },
            complete: function() {
                \$('#form').fadeTo('slow', 1);
            },
            success: function( response ) {
                console.log( response );
            }
        });
    });

    \$(document).on('click', '.addSetting', function(){

        \$.ajax( {
            type: 'post',
            url: '";
        // line 304
        echo ($context["add_setting"] ?? null);
        echo "',
            beforeSend: function() {
                \$('#form').fadeTo('slow', 0.5);
            },
            complete: function() {
                \$('#form').fadeTo('slow', 1);
            },
            success: function( response ) {
                location.reload();
                console.log( response );
            }
        });

    })

    \$(document).on('click', '.deleteSetting', function(){
        var setting_id = \$(this).data('setting_id');
        \$.ajax( {
            type: 'post',
            url: '";
        // line 323
        echo ($context["delete_setting"] ?? null);
        echo "',
            data: 'setting_id='+setting_id,
            beforeSend: function() {
                \$('#form').fadeTo('slow', 0.5);
            },
            complete: function() {
                \$('#form').fadeTo('slow', 1);
            },
            success: function( response ) {
                window.location.replace(response.url);
                console.log( response );
            }
        });

    })

    \$(document).on('change', '.changeStore', function(){
        var store_id = \$(this).val();
        \$.ajax( {
            type: 'post',
            url: '";
        // line 343
        echo ($context["change_store"] ?? null);
        echo "',
            data: 'store_id='+store_id,
            beforeSend: function() {
                \$('#form').fadeTo('slow', 0.5);
            },
            complete: function() {
                \$('#form').fadeTo('slow', 1);
            },
            success: function( response ) {
                \$('#setting_id').val(response.setting_id);
                console.log( response );
            }
        });

    })

    \$(document).on('click', '.editor', function(){

        var setting_id = \$('#setting_id').val();
        var editor = \$(this).attr('href');

        window.open(editor+'&setting_id='+setting_id, '_blank');
        return false;

    })
});
//--></script>
";
        // line 370
        echo ($context["footer"] ?? null);
        echo "


";
    }

    public function getTemplateName()
    {
        return "extension/module/d_quickcheckout.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  572 => 370,  542 => 343,  519 => 323,  497 => 304,  470 => 280,  466 => 279,  457 => 272,  447 => 265,  436 => 256,  434 => 255,  429 => 252,  421 => 246,  414 => 237,  412 => 233,  398 => 217,  337 => 154,  324 => 144,  317 => 140,  312 => 138,  300 => 133,  296 => 132,  291 => 130,  279 => 125,  275 => 124,  270 => 122,  264 => 118,  250 => 107,  246 => 106,  243 => 105,  239 => 103,  228 => 101,  224 => 100,  219 => 98,  209 => 90,  207 => 89,  204 => 88,  195 => 81,  193 => 80,  188 => 78,  181 => 73,  179 => 72,  176 => 71,  169 => 59,  164 => 56,  159 => 53,  156 => 52,  147 => 46,  139 => 40,  137 => 39,  133 => 37,  126 => 34,  122 => 33,  119 => 32,  112 => 29,  107 => 28,  101 => 26,  99 => 25,  92 => 20,  82 => 19,  76 => 18,  69 => 16,  62 => 14,  57 => 12,  52 => 10,  40 => 3,  37 => 2,);
    }

    public function getSourceContext()
    {
        return new Source("", "extension/module/d_quickcheckout.twig", "");
    }
}
