<?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;
/* beautytada/layout/header.twig */
class __TwigTemplate_52078234b0bbbe6ce8facc1a0855848cf5d22fa7f4ad2907994bb94774909565 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "beautytada/layout/header.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "beautytada/layout/header.twig"));
// line 1
echo "<header class=\"header\" id=\"header\">
";
// line 2
$context["user"] = null;
// line 3
echo " ";
if ( !(null === 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.', 3, $this->source); })()), "user", [], "any", false, false, false, 3))) {
// line 4
echo " ";
$context["user"] = ["name" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 5
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 5, $this->source); })()), "user", [], "any", false, false, false, 5), "displayName", [], "any", false, false, false, 5), "roles" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 6
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 6, $this->source); })()), "user", [], "any", false, false, false, 6), "roles", [], "any", false, false, false, 6)];
// line 8
echo " ";
}
// line 9
echo " <init-constant
:constant=\"{
isLogin: !!('";
// line 11
echo ((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.', 11, $this->source); })()), "user", [], "any", false, false, false, 11)) ? (true) : (false));
echo "'),
user: JSON.parse('";
// line 12
echo twig_escape_filter($this->env, json_encode((isset($context["user"]) || array_key_exists("user", $context) ? $context["user"] : (function () { throw new RuntimeError('Variable "user" does not exist.', 12, $this->source); })())), "html", null, true);
echo "')
}\"
@get-constant=\"getConstant\">
</init-constant>
<div class=\"header-wrapper\">
<div class=\"header-logo\">
<a href=\"";
// line 19
echo twig_escape_filter($this->env, $this->extensions['Kobizo\Component\Template\TwigExtensions\SiteProviderExtension']->getSiteUrl(), "html", null, true);
echo "\" class=\"nav-logo\">
<img src=\"";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/logo-white.png"), "html", null, true);
echo "\" alt=\"Beautytada\">
</a>
</div>
";
// line 24
if ((0 !== twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 24, $this->source); })()), "request", [], "any", false, false, false, 24), "attributes", [], "any", false, false, false, 24), "get", [0 => "_route"], "method", false, false, false, 24), "home"))) {
// line 25
echo " <open-address-form inline-template>
<div class=\"address\" @click=\"activeAddressForm\">
<template v-if=\"postcode\">
<span>";
// line 28
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("ZIP code", [], "messages");
echo "</span>
<span class=\"address-value\" v-text=\"postcode\"></span>
</template>
<template v-else>
<span class=\"address-content-value\">";
// line 32
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Where do you want to order from?", [], "messages");
echo "</span>
</template>
</div>
</open-address-form>
";
}
// line 37
echo "
<div class=\"header-control-buttons\">
<div class=\"header-restaurant-registration\">
<a href=\"";
// line 40
echo twig_escape_filter($this->env, $this->extensions['Kobizo\Component\Template\TwigExtensions\PageProviderExtension']->getUrl(["slug" => "register-a-salon"]), "html", null, true);
echo "\" class=\"header-restaurant-registration-btn\">
<svg xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#fff\"><g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><g><rect height=\"2\" width=\"15\" x=\"2\" y=\"4\"/><path d=\"M15,17h2v-3h1v-2l-1-5H2l-1,5v2h1v6h9v-6h4V17z M9,18H4v-4h5V18z M3.04,12l0.6-3h11.72l0.6,3H3.04z\"/><polygon points=\"23,18 20,18 20,15 18,15 18,18 15,18 15,20 18,20 18,23 20,23 20,20 23,20\"/></g></g></svg>
<p>";
// line 42
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("registration", [], "messages");
echo "</p>
</a>
</div>
";
// line 45
$this->loadTemplate("default/layout/header-components/locales.twig", "beautytada/layout/header.twig", 45)->display($context);
// line 46
echo "
<burger-button @burger-button-toggle-state=\"togglePopup\"
:option=\"{height: '15px', round: '4px'}\"
:is-active=\"burgerButtonActive\">
</burger-button>
<login-form :path=\"'";
// line 52
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_api_login");
echo "'\" :is-login=\"isLogin\" @login-success=\"loginSuccess\"
:logo=\"{src: '";
// line 53
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/logo-white.png"), "html", null, true);
echo "', alt: 'Beautytada'}\" :show-popup=\"showLoginPopup\" @toggle-login-form=\"toggleLoginForm\">
";
// line 54
$this->loadTemplate("default/components/form/login.twig", "beautytada/layout/header.twig", 54)->display($context);
// line 55
echo " </login-form>
<user-info :is-login=\"isLogin\" :is-active=\"burgerButtonActive\" :user=\"user\">
";
// line 58
$this->loadTemplate("default/components/user-info.twig", "beautytada/layout/header.twig", 58)->display($context);
// line 59
echo " </user-info>
</div>
</div>
</header>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "beautytada/layout/header.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 153 => 59, 151 => 58, 146 => 55, 144 => 54, 140 => 53, 136 => 52, 128 => 46, 126 => 45, 120 => 42, 115 => 40, 110 => 37, 102 => 32, 95 => 28, 90 => 25, 88 => 24, 81 => 20, 77 => 19, 67 => 12, 63 => 11, 59 => 9, 56 => 8, 54 => 6, 53 => 5, 51 => 4, 48 => 3, 46 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<header class=\"header\" id=\"header\">
{% set user = null %}
{% if app.user is not null %}
{% set user = {
name: app.user.displayName,
roles: app.user.roles
} %}
{% endif %}
<init-constant
:constant=\"{
isLogin: !!('{{ app.user ? true : false }}'),
user: JSON.parse('{{ user|json_encode }}')
}\"
@get-constant=\"getConstant\">
</init-constant>
<div class=\"header-wrapper\">
<div class=\"header-logo\">
<a href=\"{{ k_site_url() }}\" class=\"nav-logo\">
<img src=\"{{ asset('build/images/logo-white.png') }}\" alt=\"Beautytada\">
</a>
</div>
{% if app.request.attributes.get('_route') != 'home' %}
<open-address-form inline-template>
<div class=\"address\" @click=\"activeAddressForm\">
<template v-if=\"postcode\">
<span>{% trans %}ZIP code{% endtrans %}</span>
<span class=\"address-value\" v-text=\"postcode\"></span>
</template>
<template v-else>
<span class=\"address-content-value\">{% trans %}Where do you want to order from?{% endtrans %}</span>
</template>
</div>
</open-address-form>
{% endif %}
<div class=\"header-control-buttons\">
<div class=\"header-restaurant-registration\">
<a href=\"{{ k_page_url({'slug': 'register-a-salon'}) }}\" class=\"header-restaurant-registration-btn\">
<svg xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#fff\"><g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><g><rect height=\"2\" width=\"15\" x=\"2\" y=\"4\"/><path d=\"M15,17h2v-3h1v-2l-1-5H2l-1,5v2h1v6h9v-6h4V17z M9,18H4v-4h5V18z M3.04,12l0.6-3h11.72l0.6,3H3.04z\"/><polygon points=\"23,18 20,18 20,15 18,15 18,18 15,18 15,20 18,20 18,23 20,23 20,20 23,20\"/></g></g></svg>
<p>{% trans %}registration{% endtrans %}</p>
</a>
</div>
{% include 'default/layout/header-components/locales.twig' %}
<burger-button @burger-button-toggle-state=\"togglePopup\"
:option=\"{height: '15px', round: '4px'}\"
:is-active=\"burgerButtonActive\">
</burger-button>
<login-form :path=\"'{{ path(\"app_api_login\") }}'\" :is-login=\"isLogin\" @login-success=\"loginSuccess\"
:logo=\"{src: '{{ asset(\"build/images/logo-white.png\") }}', alt: 'Beautytada'}\" :show-popup=\"showLoginPopup\" @toggle-login-form=\"toggleLoginForm\">
{% include 'default/components/form/login.twig' %}
</login-form>
<user-info :is-login=\"isLogin\" :is-active=\"burgerButtonActive\" :user=\"user\">
{% include 'default/components/user-info.twig' %}
</user-info>
</div>
</div>
</header>
", "beautytada/layout/header.twig", "/home/btdcom/www/testing-kob26688.beautytada.com/templates/beautytada/layout/header.twig");
}
}