<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;

/* agent/_boutons_prog_quitter.html.twig */
class __TwigTemplate_02d12351d2edeed40736f57776dda82216edcf1ee21a37b91e50b0acb224d31a 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", "agent/_boutons_prog_quitter.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "agent/_boutons_prog_quitter.html.twig"));

        // line 1
        yield "
";
        // line 2
        if (((isset($context["affectation"]) || array_key_exists("affectation", $context) ? $context["affectation"] : (function () { throw new RuntimeError('Variable "affectation" does not exist.', 2, $this->source); })()) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["affectation"]) || array_key_exists("affectation", $context) ? $context["affectation"] : (function () { throw new RuntimeError('Variable "affectation" does not exist.', 2, $this->source); })()), "finEffet", [], "any", false, false, false, 2))) {
            // line 3
            yield "    <div class=\"d-flex align-items-start justify-content-end h-100\">
        <button class=\"btn bg-vert-vert w-100 \" style=\"width: 193px !important;margin-right: 0.6rem;\"
                data-popup-id=\"popup-programmer-changement\"
                data-poppup-container=\"body\"
                style=\"width:138px;margin-bottom: 7px\"
                data-disable-on-view=\"\"
                data-dxpopup=\"\"
                data-popup-position-at=\"top\"
                data-popup-offset =\"0 275\"
                data-popup-title=\"Programmer un changement\"
                data-popup-width=\"1390px\">
                Programmer un changement
        </button>
        <div class=\"d-flex flex-column align-self-end justify-content-center border-left-white h-100\" style=\"width:232px;padding-right: 3.5rem;padding-left: 0.5rem;gap:0.5rem;margin-bottom: 4px;\">
            <span class=\"color-white text-center\" style=\"padding: 0 6px;\">l'affectation actuelle prendra fin le ";
            // line 17
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["affectation"]) || array_key_exists("affectation", $context) ? $context["affectation"] : (function () { throw new RuntimeError('Variable "affectation" does not exist.', 17, $this->source); })()), "finEffet", [], "any", false, false, false, 17), "d/m/Y"), "html", null, true);
            yield "</span>
            <button class=\"btn bg-rouge-rouge w-100\" data-confirm=\"1\" data-ajax=\"1\" data-target-html=\"#result-prog-quitter\" data-disable-on-view=\"\" data-message=\"Etes vous sur de vouloir annuler le départ?\" data-href=\"";
            // line 18
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("agent_cancel_depart", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["affectation"]) || array_key_exists("affectation", $context) ? $context["affectation"] : (function () { throw new RuntimeError('Variable "affectation" does not exist.', 18, $this->source); })()), "id", [], "any", false, false, false, 18)]), "html", null, true);
            yield "\">Annuler le départ</button>
        </div>
    </div>
";
        } else {
            // line 22
            yield "    <div class=\"d-flex  ";
            yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["agent"]) || array_key_exists("agent", $context) ? $context["agent"] : (function () { throw new RuntimeError('Variable "agent" does not exist.', 22, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 22)) ? ("align-items-start justify-content-end") : ("flex-column align-items-center"));
            yield " h-100 \" style=\"gap:0.5rem;\">
    ";
            // line 23
            if ( !CoreExtension::getAttribute($this->env, $this->source, (isset($context["agent"]) || array_key_exists("agent", $context) ? $context["agent"] : (function () { throw new RuntimeError('Variable "agent" does not exist.', 23, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 23)) {
                // line 24
                yield "    <button class=\"btn bg-vert-vert w-100\" style=\"width: 193px !important;\"
            data-popup-id=\"popup-programmer-changement\"
            data-poppup-container=\"body\"
            data-popup-position-at=\"top\"
            data-popup-offset =\"0 275\"
            style=\"width:138px;margin-bottom: 7px\"
            data-disable-on-view=\"\"
            data-dxpopup=\"\"
            data-popup-title=\"Programmer un changement\"
            data-popup-width=\"1390px\">
            Programmer un changement
    </button>
    ";
            }
            // line 37
            yield "    ";
            if ((isset($context["affectation"]) || array_key_exists("affectation", $context) ? $context["affectation"] : (function () { throw new RuntimeError('Variable "affectation" does not exist.', 37, $this->source); })())) {
                // line 38
                yield "        <button class=\"btn bg-rouge-rouge w-100\"
                style=\"width:193px !important\"
                data-popup-id=\"popup-quitter-entreprise\"
                data-poppup-container=\"body\"
                data-popup-position-at=\"top\"
                data-popup-offset =\"0 275\"
                data-dxpopup=\"\"
                data-disable-on-view=\"\"
                data-popup-title=\"Quitter l'entreprise\"
                data-popup-width=\"auto\">
           Quitter l'entreprise
        </button>
    ";
            }
            // line 51
            yield "    ";
            if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["agent"]) || array_key_exists("agent", $context) ? $context["agent"] : (function () { throw new RuntimeError('Variable "agent" does not exist.', 51, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 51)) {
                // line 52
                yield "        <div class=\"d-flex flex-column align-self-end justify-content-center border-left-white h-100\" style=\"width:232px;padding-right: 3.5rem;padding-left: 0.5rem;gap:0.5rem;margin-bottom: 4px;\">
            <span class=\"color-white text-center\" style=\"padding: 0 6px;\">changement programmé prévu le ";
                // line 53
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["agent"]) || array_key_exists("agent", $context) ? $context["agent"] : (function () { throw new RuntimeError('Variable "agent" does not exist.', 53, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 53), "DebutEffet", [], "any", false, false, false, 53), "d/m/Y"), "html", null, true);
                yield " </span>
            <button class=\"btn bg-vert-vert w-100\"  data-popup-id=\"popup-programmer-changement\"  data-disable-on-view=\"\" data-poppup-container=\"body\" style=\"width:138px;margin-bottom: 7px\" data-dxpopup=\"\" data-popup-title=\"Programmer un changement\"   data-popup-width=\"1390px\" >Afficher le changement</button>
        </div>
    ";
            }
            // line 57
            yield "    </div>
";
        }
        // line 59
        yield "<div id=\"popup-programmer-changement\" style=\"display:none\" data-turbo =\"false\" >
    <form ></form>
    ";
        // line 61
        yield Twig\Extension\CoreExtension::include($this->env, $context, "agent/_popup_prog_affectation.html.twig");
        yield "
</div>";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "agent/_boutons_prog_quitter.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  137 => 61,  133 => 59,  129 => 57,  122 => 53,  119 => 52,  116 => 51,  101 => 38,  98 => 37,  83 => 24,  81 => 23,  76 => 22,  69 => 18,  65 => 17,  49 => 3,  47 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("
{% if affectation and affectation.finEffet %}
    <div class=\"d-flex align-items-start justify-content-end h-100\">
        <button class=\"btn bg-vert-vert w-100 \" style=\"width: 193px !important;margin-right: 0.6rem;\"
                data-popup-id=\"popup-programmer-changement\"
                data-poppup-container=\"body\"
                style=\"width:138px;margin-bottom: 7px\"
                data-disable-on-view=\"\"
                data-dxpopup=\"\"
                data-popup-position-at=\"top\"
                data-popup-offset =\"0 275\"
                data-popup-title=\"Programmer un changement\"
                data-popup-width=\"1390px\">
                Programmer un changement
        </button>
        <div class=\"d-flex flex-column align-self-end justify-content-center border-left-white h-100\" style=\"width:232px;padding-right: 3.5rem;padding-left: 0.5rem;gap:0.5rem;margin-bottom: 4px;\">
            <span class=\"color-white text-center\" style=\"padding: 0 6px;\">l'affectation actuelle prendra fin le {{ affectation.finEffet|date(\"d/m/Y\") }}</span>
            <button class=\"btn bg-rouge-rouge w-100\" data-confirm=\"1\" data-ajax=\"1\" data-target-html=\"#result-prog-quitter\" data-disable-on-view=\"\" data-message=\"Etes vous sur de vouloir annuler le départ?\" data-href=\"{{ path('agent_cancel_depart', {id: affectation.id}) }}\">Annuler le départ</button>
        </div>
    </div>
{% else %}
    <div class=\"d-flex  {{ agent.getNextAffectation ? 'align-items-start justify-content-end' : 'flex-column align-items-center' }} h-100 \" style=\"gap:0.5rem;\">
    {% if not agent.getNextAffectation %}
    <button class=\"btn bg-vert-vert w-100\" style=\"width: 193px !important;\"
            data-popup-id=\"popup-programmer-changement\"
            data-poppup-container=\"body\"
            data-popup-position-at=\"top\"
            data-popup-offset =\"0 275\"
            style=\"width:138px;margin-bottom: 7px\"
            data-disable-on-view=\"\"
            data-dxpopup=\"\"
            data-popup-title=\"Programmer un changement\"
            data-popup-width=\"1390px\">
            Programmer un changement
    </button>
    {% endif %}
    {%  if affectation  %}
        <button class=\"btn bg-rouge-rouge w-100\"
                style=\"width:193px !important\"
                data-popup-id=\"popup-quitter-entreprise\"
                data-poppup-container=\"body\"
                data-popup-position-at=\"top\"
                data-popup-offset =\"0 275\"
                data-dxpopup=\"\"
                data-disable-on-view=\"\"
                data-popup-title=\"Quitter l'entreprise\"
                data-popup-width=\"auto\">
           Quitter l'entreprise
        </button>
    {% endif %}
    {% if  agent.getNextAffectation %}
        <div class=\"d-flex flex-column align-self-end justify-content-center border-left-white h-100\" style=\"width:232px;padding-right: 3.5rem;padding-left: 0.5rem;gap:0.5rem;margin-bottom: 4px;\">
            <span class=\"color-white text-center\" style=\"padding: 0 6px;\">changement programmé prévu le {{ agent.getNextAffectation.DebutEffet|date(\"d/m/Y\") }} </span>
            <button class=\"btn bg-vert-vert w-100\"  data-popup-id=\"popup-programmer-changement\"  data-disable-on-view=\"\" data-poppup-container=\"body\" style=\"width:138px;margin-bottom: 7px\" data-dxpopup=\"\" data-popup-title=\"Programmer un changement\"   data-popup-width=\"1390px\" >Afficher le changement</button>
        </div>
    {% endif %}
    </div>
{% endif %}
<div id=\"popup-programmer-changement\" style=\"display:none\" data-turbo =\"false\" >
    <form ></form>
    {{ include('agent/_popup_prog_affectation.html.twig') }}
</div>", "agent/_boutons_prog_quitter.html.twig", "/builds/dev/refonte_sav/templates/agent/_boutons_prog_quitter.html.twig");
    }
}
