<?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;
/* @SyliusShop/Common/_addToWishlist.html.twig */
class __TwigTemplate_bb6879cf95f10bc24494256f16365423 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;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Common/_addToWishlist.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Common/_addToWishlist.html.twig"));
// line 1
if (twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 1, $this->source); })()), "user", [], "any", false, false, false, 1)) {
// line 2
echo " ";
if ((twig_length_filter($this->env, $this->extensions['BitBag\SyliusWishlistPlugin\Twig\WishlistExtension']->findAllByShopUserAndToken(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 2, $this->source); })()), "user", [], "any", false, false, false, 2))) < 2)) {
// line 3
echo " <a
href=\"";
// line 4
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_wishlist_plugin_shop_wishlist_add_product", ["productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 4, $this->source); })()), "id", [], "any", false, false, false, 4)]), "html", null, true);
echo "\"
class=\"bitbag-add-to-wishlist ui icon labeled button blue\"
data-product-name=\"";
// line 6
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 6, $this->source); })()), "name", [], "any", false, false, false, 6), "html", null, true);
echo "\"
";
// line 7
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("wishlist-add-product");
echo "
>
<i class=\"icon heart\"></i>
";
// line 11
echo " </a>
";
} else {
// line 13
echo " <div class=\"ui dropdown button\">
<i class=\"heart icon\"></i>
<div class=\"menu\" data-bb-wishlist-hrefs=\"hrefs-adding-variant\">
";
// line 16
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['BitBag\SyliusWishlistPlugin\Twig\WishlistExtension']->findAllByShopUserAndToken(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 16, $this->source); })()), "user", [], "any", false, false, false, 16)));
foreach ($context['_seq'] as $context["_key"] => $context["wishlist"]) {
// line 17
echo " <a
href=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_wishlist_plugin_shop_wishlist_add_product_to_selected_wishlist", ["wishlistId" => twig_get_attribute($this->env, $this->source, $context["wishlist"], "id", [], "any", false, false, false, 18), "productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 18, $this->source); })()), "id", [], "any", false, false, false, 18)]), "html", null, true);
echo "\"
class=\"item\"
data-product-name=\"";
// line 20
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 20, $this->source); })()), "name", [], "any", false, false, false, 20), "html", null, true);
echo "\"
";
// line 21
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("bitbag-add-to-wishlist");
echo "
>
<span>
";
// line 24
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["wishlist"], "name", [], "any", false, false, false, 24), "html", null, true);
echo "
</span>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['wishlist'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 28
echo " </div>
</div>
";
}
} else {
// line 32
echo " ";
if ((twig_length_filter($this->env, $this->extensions['BitBag\SyliusWishlistPlugin\Twig\WishlistExtension']->findAllByAnonymousAndChannel(twig_get_attribute($this->env, $this->source, (isset($context["sylius"]) || array_key_exists("sylius", $context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.', 32, $this->source); })()), "channel", [], "any", false, false, false, 32))) < 2)) {
// line 33
echo " <a
href=\"";
// line 34
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_wishlist_plugin_shop_wishlist_add_product", ["productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 34, $this->source); })()), "id", [], "any", false, false, false, 34)]), "html", null, true);
echo "\"
class=\"bitbag-add-to-wishlist ui icon labeled button blue\"
data-product-name=\"";
// line 36
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 36, $this->source); })()), "name", [], "any", false, false, false, 36), "html", null, true);
echo "\"
";
// line 37
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("wishlist-add-product");
echo "
>
<i class=\"icon heart\"></i>
";
// line 41
echo " </a>
";
} else {
// line 43
echo " <div class=\"ui dropdown button\">
<i class=\"heart icon\"></i>
<div class=\"menu\" data-bb-wishlist-hrefs=\"hrefs-adding-variant\">
";
// line 46
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['BitBag\SyliusWishlistPlugin\Twig\WishlistExtension']->findAllByAnonymousAndChannel(twig_get_attribute($this->env, $this->source, (isset($context["sylius"]) || array_key_exists("sylius", $context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.', 46, $this->source); })()), "channel", [], "any", false, false, false, 46)));
foreach ($context['_seq'] as $context["_key"] => $context["wishlist"]) {
// line 47
echo " <a
href=\"";
// line 48
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_wishlist_plugin_shop_wishlist_add_product_to_selected_wishlist", ["wishlistId" => twig_get_attribute($this->env, $this->source, $context["wishlist"], "id", [], "any", false, false, false, 48), "productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 48, $this->source); })()), "id", [], "any", false, false, false, 48)]), "html", null, true);
echo "\"
class=\"item\"
data-product-name=\"";
// line 50
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 50, $this->source); })()), "name", [], "any", false, false, false, 50), "html", null, true);
echo "\"
";
// line 51
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("wishlist-add-product");
echo "
>
<span>
";
// line 54
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["wishlist"], "name", [], "any", false, false, false, 54), "html", null, true);
echo "
</span>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['wishlist'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 58
echo " </div>
</div>
";
}
// line 61
echo " <style>
/*.bitbag-add-to-wishlist.ui.icon.labeled.button.blue{*/
/* padding: 0 !important;*/
/* position: absolute;*/
/* top: 2rem;*/
/* right: 4rem;*/
/* z-index: 999;*/
/* width: fit-content;*/
/*}*/
/*.bitbag-add-to-wishlist.ui.icon.labeled.button.blue i{*/
/* background-color: transparent !important;*/
/* font-size: var(--sm-fz) !important;*/
/*}*/
/*.bitbag-add-to-wishlist.ui.icon.labeled.button.blue i:hover{*/
/* color: #E35E31 !important;*/
/*}*/
</style>
";
}
// line 79
echo "
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Common/_addToWishlist.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 200 => 79, 180 => 61, 175 => 58, 165 => 54, 159 => 51, 155 => 50, 150 => 48, 147 => 47, 143 => 46, 138 => 43, 134 => 41, 128 => 37, 124 => 36, 119 => 34, 116 => 33, 113 => 32, 107 => 28, 97 => 24, 91 => 21, 87 => 20, 82 => 18, 79 => 17, 75 => 16, 70 => 13, 66 => 11, 60 => 7, 56 => 6, 51 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if app.user %}
{% if findAllByShopUserAndToken(app.user)|length < 2 %}
<a
href=\"{{ path('bitbag_sylius_wishlist_plugin_shop_wishlist_add_product', {'productId': product.id}) }}\"
class=\"bitbag-add-to-wishlist ui icon labeled button blue\"
data-product-name=\"{{ product.name }}\"
{{ sylius_test_html_attribute('wishlist-add-product') }}
>
<i class=\"icon heart\"></i>
{# {{ 'bitbag_sylius_wishlist_plugin.ui.add_to_wishlist'|trans }}#}
</a>
{% else %}
<div class=\"ui dropdown button\">
<i class=\"heart icon\"></i>
<div class=\"menu\" data-bb-wishlist-hrefs=\"hrefs-adding-variant\">
{% for wishlist in findAllByShopUserAndToken(app.user) %}
<a
href=\"{{ path('bitbag_sylius_wishlist_plugin_shop_wishlist_add_product_to_selected_wishlist', {'wishlistId': wishlist.id, 'productId': product.id}) }}\"
class=\"item\"
data-product-name=\"{{ product.name }}\"
{{ sylius_test_html_attribute('bitbag-add-to-wishlist') }}
>
<span>
{{ wishlist.name }}
</span>
</a>
{% endfor %}
</div>
</div>
{% endif %}
{% else %}
{% if findAllByAnonymousAndChannel(sylius.channel)|length < 2 %}
<a
href=\"{{ path('bitbag_sylius_wishlist_plugin_shop_wishlist_add_product', {'productId': product.id}) }}\"
class=\"bitbag-add-to-wishlist ui icon labeled button blue\"
data-product-name=\"{{ product.name }}\"
{{ sylius_test_html_attribute('wishlist-add-product') }}
>
<i class=\"icon heart\"></i>
{# {{ 'bitbag_sylius_wishlist_plugin.ui.add_to_wishlist'|trans }}#}
</a>
{% else %}
<div class=\"ui dropdown button\">
<i class=\"heart icon\"></i>
<div class=\"menu\" data-bb-wishlist-hrefs=\"hrefs-adding-variant\">
{% for wishlist in findAllByAnonymousAndChannel(sylius.channel) %}
<a
href=\"{{ path('bitbag_sylius_wishlist_plugin_shop_wishlist_add_product_to_selected_wishlist', {'wishlistId': wishlist.id, 'productId': product.id}) }}\"
class=\"item\"
data-product-name=\"{{ product.name }}\"
{{ sylius_test_html_attribute('wishlist-add-product') }}
>
<span>
{{ wishlist.name }}
</span>
</a>
{% endfor %}
</div>
</div>
{% endif %}
<style>
/*.bitbag-add-to-wishlist.ui.icon.labeled.button.blue{*/
/* padding: 0 !important;*/
/* position: absolute;*/
/* top: 2rem;*/
/* right: 4rem;*/
/* z-index: 999;*/
/* width: fit-content;*/
/*}*/
/*.bitbag-add-to-wishlist.ui.icon.labeled.button.blue i{*/
/* background-color: transparent !important;*/
/* font-size: var(--sm-fz) !important;*/
/*}*/
/*.bitbag-add-to-wishlist.ui.icon.labeled.button.blue i:hover{*/
/* color: #E35E31 !important;*/
/*}*/
</style>
{% endif %}
", "@SyliusShop/Common/_addToWishlist.html.twig", "/var/www/Bikers/templates/bundles/SyliusShopBundle/Common/_addToWishlist.html.twig");
}
}