<?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/_popup_prog_affectation.html.twig */
class __TwigTemplate_4350fa0b66e4ff3cfeb8cd50f0170c791e980f9ddb704e503497a625591dede1 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/_popup_prog_affectation.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/_popup_prog_affectation.html.twig"));

        // line 1
        $context["disabled"] = "disabled";
        // line 2
        $context["hasNext"] = ((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.', 2, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 2)) ? (true) : (false));
        // line 3
        if ((isset($context["hasNext"]) || array_key_exists("hasNext", $context) ? $context["hasNext"] : (function () { throw new RuntimeError('Variable "hasNext" does not exist.', 3, $this->source); })())) {
            // line 4
            yield "    <div class=\"d-flex justify-content-end mb-2\">
        <button  class=\"btn btn-outline-danger\" data-confirm=\"1\" data-ajax=\"1\" data-target-html=\"#result-prog-quitter\" data-href=\"";
            // line 5
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("agent_cancel_affectation", ["id" => 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.', 5, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 5), "id", [], "any", false, false, false, 5)]), "html", null, true);
            yield "\" >Annuler le changement</button>
    </div>
";
        }
        // line 8
        yield "    <form action=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("agent_programmer_changement", ["id" => 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.', 8, $this->source); })()), "id", [], "any", false, false, false, 8)]), "html", null, true);
        yield "\" data-no-reset = \"noreset\"  id=\"form-prog-agent\" class=\"form-ajax\" data-target-html=\"#result-prog-quitter\" method=\"post\" data-turbo=\"false\">
        <div class=\"d-flex  color-orange position-relative\">
            <div class=\"position-absolute\" style=\"left: 48.8%;top: 5px\"><img width=\"34\" height=\"34\" src=\"";
        // line 10
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/fleche-droite.png"), "html", null, true);
        yield "\"></div>
            <div class=\" bg-grey-light d-flex align-items-center justify-content-center\" style=\"width:48.5%\">
                <span class=\"color-orange\">Depuis le ";
        // line 12
        (((isset($context["affectation"]) || array_key_exists("affectation", $context) ? $context["affectation"] : (function () { throw new RuntimeError('Variable "affectation" does not exist.', 12, $this->source); })())) ? (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.', 12, $this->source); })()), "debutEffet", [], "any", false, false, false, 12), "d/m/Y"), "html", null, true)) : (yield ""));
        yield "</span>
            </div>
            <div style=\"width:3%\"></div>
            <div class=\" bg-grey-light d-flex align-items-center color-orange justify-content-center\" style=\"width:48.5%\">
                <span class=\"me-2 color-orange\">A partir de</span>
                ";
        // line 17
        $context["dateValue"] = ((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.', 17, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 17)) ? ($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.', 17, $this->source); })()), "getNextAffectation", [], "any", false, false, false, 17), "debutEffet", [], "any", false, false, false, 17), "Y-m-d")) : (""));
        // line 18
        yield "                <input type=\"date\" name=\"date_debut_programme\" required class=\"form-control bg-grey\" style=\"width:150px;\" min=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate($this->extensions['Twig\Extension\CoreExtension']->modifyDate("now", "+1 day"), "Y-m-d"), "html", null, true);
        yield "\" value=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["dateValue"]) || array_key_exists("dateValue", $context) ? $context["dateValue"] : (function () { throw new RuntimeError('Variable "dateValue" does not exist.', 18, $this->source); })()), "html", null, true);
        yield "\">
            </div>
        </div>
        <div class=\"d-flex justify-content-between flex-wrap position-relative\">
            <div class=\"d-flex flex-column h-auto\" style=\"width:48.5%\">
                <div class=\"px-2 py-2  border-grey-medium w-100 h-100\" style=\"color:white\">
                    ";
        // line 24
        $context["type"] = "show";
        // line 25
        yield "                    ";
        $context["programmation"] = "oui";
        // line 26
        yield "                    ";
        yield Twig\Extension\CoreExtension::include($this->env, $context, "agent/_affectation.html.twig");
        yield "
                </div>
            </div>
            <div class=\"d-flex flex-column h-auto\" style=\"width:48.5%\" >
                <div class=\"px-2 py-2 w-100 h-100 border-grey-medium\">
                    ";
        // line 31
        $context["disabled"] = "";
        // line 32
        yield "                    ";
        $context["type"] = "edit";
        // line 33
        yield "                    ";
        $context["programmation"] = "oui";
        // line 34
        yield "                    ";
        $context["styleBlock"] = "width:760px;";
        // line 35
        yield "                    ";
        yield Twig\Extension\CoreExtension::include($this->env, $context, "agent/_affectation.html.twig");
        yield "
                </div>
            </div>
        </div>
        <div class=\"form-group d-flex justify-content-center mt-4\">
            <div class=\"form-actions-row\">
                <button  class=\"btn btn-outline-danger btn-close-popup me-3\"  data-dxpopup-id=\"popup-programmer-changement\" type=\"button\" >Annuler</button>
                <button  class=\"btn btn-outline-success  \" type=\"submit\" form=\"form-prog-agent\">Valider</button>
            </div>
        </div>
    </form>
";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  117 => 35,  114 => 34,  111 => 33,  108 => 32,  106 => 31,  97 => 26,  94 => 25,  92 => 24,  80 => 18,  78 => 17,  70 => 12,  65 => 10,  59 => 8,  53 => 5,  50 => 4,  48 => 3,  46 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{%  set disabled = 'disabled' %}
{% set hasNext = agent.getNextAffectation ? true : false %}
{%  if hasNext %}
    <div class=\"d-flex justify-content-end mb-2\">
        <button  class=\"btn btn-outline-danger\" data-confirm=\"1\" data-ajax=\"1\" data-target-html=\"#result-prog-quitter\" data-href=\"{{ path('agent_cancel_affectation', {id: agent.getNextAffectation.id}) }}\" >Annuler le changement</button>
    </div>
{% endif %}
    <form action=\"{{ path('agent_programmer_changement', {'id' : agent.id}) }}\" data-no-reset = \"noreset\"  id=\"form-prog-agent\" class=\"form-ajax\" data-target-html=\"#result-prog-quitter\" method=\"post\" data-turbo=\"false\">
        <div class=\"d-flex  color-orange position-relative\">
            <div class=\"position-absolute\" style=\"left: 48.8%;top: 5px\"><img width=\"34\" height=\"34\" src=\"{{ asset('build/images/fleche-droite.png') }}\"></div>
            <div class=\" bg-grey-light d-flex align-items-center justify-content-center\" style=\"width:48.5%\">
                <span class=\"color-orange\">Depuis le {{ affectation ? affectation.debutEffet|date(\"d/m/Y\") : '' }}</span>
            </div>
            <div style=\"width:3%\"></div>
            <div class=\" bg-grey-light d-flex align-items-center color-orange justify-content-center\" style=\"width:48.5%\">
                <span class=\"me-2 color-orange\">A partir de</span>
                {% set dateValue = (agent.getNextAffectation) ? agent.getNextAffectation.debutEffet|date(\"Y-m-d\") : '' %}
                <input type=\"date\" name=\"date_debut_programme\" required class=\"form-control bg-grey\" style=\"width:150px;\" min=\"{{\"now\"|date_modify(\"+1 day\")|date(\"Y-m-d\") }}\" value=\"{{ dateValue }}\">
            </div>
        </div>
        <div class=\"d-flex justify-content-between flex-wrap position-relative\">
            <div class=\"d-flex flex-column h-auto\" style=\"width:48.5%\">
                <div class=\"px-2 py-2  border-grey-medium w-100 h-100\" style=\"color:white\">
                    {%  set type = 'show' %}
                    {% set programmation = 'oui' %}
                    {{ include('agent/_affectation.html.twig') }}
                </div>
            </div>
            <div class=\"d-flex flex-column h-auto\" style=\"width:48.5%\" >
                <div class=\"px-2 py-2 w-100 h-100 border-grey-medium\">
                    {%  set disabled = '' %}
                    {%  set type = 'edit' %}
                    {% set programmation = 'oui' %}
                    {% set styleBlock = 'width:760px;' %}
                    {{ include('agent/_affectation.html.twig') }}
                </div>
            </div>
        </div>
        <div class=\"form-group d-flex justify-content-center mt-4\">
            <div class=\"form-actions-row\">
                <button  class=\"btn btn-outline-danger btn-close-popup me-3\"  data-dxpopup-id=\"popup-programmer-changement\" type=\"button\" >Annuler</button>
                <button  class=\"btn btn-outline-success  \" type=\"submit\" form=\"form-prog-agent\">Valider</button>
            </div>
        </div>
    </form>
", "agent/_popup_prog_affectation.html.twig", "/builds/dev/refonte_sav/templates/agent/_popup_prog_affectation.html.twig");
    }
}
