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

/* @public_path/js/main.js */
class __TwigTemplate_b87c94c27495c985920b4d1f446e8d395cf3c2a01c8794b57d4ddf1694ff498e 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", "@public_path/js/main.js"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@public_path/js/main.js"));

        yield "// Template pour l'affichage de la couleur
\$(\"#gridPlanning\").dxDataGrid(\"instance\").option(\"onRowPrepared\", function(e) {
    if (e.rowType === \"data\") {
        var color = e.data.couleur;
        if (color) {
            \$(\"<div>\")
                .addClass(\"color-preview\")
                .css({
                    \"background-color\": color,
                    \"width\": \"20px\",
                    \"height\": \"20px\",
                    \"border-radius\": \"3px\",
                    \"margin\": \"0 auto\"
                })
                .appendTo(e.rowElement.find(\"td:last\"));
        }
    }
});

// Template pour l'édition de la couleur
\$(\"#gridPlanning\").dxDataGrid(\"instance\").option(\"onEditorPreparing\", function(e) {
    if (e.dataField === \"couleur\") {
        e.editorName = \"dxColorBox\";
        e.editorOptions = {
            value: e.value,
            onValueChanged: function(args) {
                e.setValue(args.value);
            }
        };
    }
}); ";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "@public_path/js/main.js";
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array ();
    }

    public function getSourceContext()
    {
        return new Source("// Template pour l'affichage de la couleur
\$(\"#gridPlanning\").dxDataGrid(\"instance\").option(\"onRowPrepared\", function(e) {
    if (e.rowType === \"data\") {
        var color = e.data.couleur;
        if (color) {
            \$(\"<div>\")
                .addClass(\"color-preview\")
                .css({
                    \"background-color\": color,
                    \"width\": \"20px\",
                    \"height\": \"20px\",
                    \"border-radius\": \"3px\",
                    \"margin\": \"0 auto\"
                })
                .appendTo(e.rowElement.find(\"td:last\"));
        }
    }
});

// Template pour l'édition de la couleur
\$(\"#gridPlanning\").dxDataGrid(\"instance\").option(\"onEditorPreparing\", function(e) {
    if (e.dataField === \"couleur\") {
        e.editorName = \"dxColorBox\";
        e.editorOptions = {
            value: e.value,
            onValueChanged: function(args) {
                e.setValue(args.value);
            }
        };
    }
}); ", "@public_path/js/main.js", "/builds/dev/refonte_sav/public/js/main.js");
    }
}
