<?php

namespace Config;

use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Validation\StrictRules\CreditCardRules;
use CodeIgniter\Validation\StrictRules\FileRules;
use CodeIgniter\Validation\StrictRules\FormatRules;
use CodeIgniter\Validation\StrictRules\Rules;

class Validation extends BaseConfig
{
    // --------------------------------------------------------------------
    // Setup
    // --------------------------------------------------------------------

    /**
     * Stores the classes that contain the
     * rules that are available.
     *
     * @var string[]
     */
    public array $ruleSets = [
        Rules::class,
        FormatRules::class,
        FileRules::class,
        CreditCardRules::class,
    ];

    /**
     * Specifies the views that are used to display the
     * errors.
     *
     * @var array<string, string>
     */
    public array $templates = [
        'list' => 'CodeIgniter\Validation\Views\list',
        'single' => 'CodeIgniter\Validation\Views\single',
        'bootstrap_style' => 'themes/_commonPartialsBs/_form_validation_errors',
    ];

    // --------------------------------------------------------------------
    // Rules
    // --------------------------------------------------------------------
    /**
     * Maquina duplicate validation
     *
     * @var array
     */
    public array $maquina_duplicate = [
        "name" => "required|string"
    ];
    /**
     * PapelImpresion duplicate validation
     *
     * @var array
     */
    public array $papel_impresion_duplicate = [
        "name" => "required|string"
    ];
    /**========================================================================
     *                           TARIFA MAQUINA ACABADO
     *========================================================================**/
    public array $tarifa_maquina_acabado =
    [
        "tarifa_acabado_id" => [
            "rules" => "required|integer",
            "label" => "tarifa acabado",
        ],
        "maquina_id" => [
            "rules" => "required|integer",
            "label" => "maquina",
        ],
        "maquina_tarea_id" => [
            "rules" => "required|integer",
            "label" => "tarea",
        ],
    ];
    public array $tarifa_maquina_manipulado =
    [
        "tarifa_manipulado_id" => [
            "rules" => "required|integer",
            "label" => "tarifa acabado",
        ],
        "maquina_id" => [
            "rules" => "required|integer",
            "label" => "maquina",
        ],
        "maquina_tarea_id" => [
            "rules" => "required|integer",
            "label" => "tarea",
        ],
    ];
    public array $tarifa_maquina_preimpresion =
    [
        "tarifa_preimpresion_id" => [
            "rules" => "required|integer",
            "label" => "tarifa acabado",
        ],
        "maquina_id" => [
            "rules" => "required|integer",
            "label" => "maquina",
        ],
        "maquina_tarea_id" => [
            "rules" => "required|integer",
            "label" => "tarea",
        ],
    ];
    public array $tarifa_maquina_encuadernacion =
    [
        "tarifa_encuadernacion_id" => [
            "rules" => "required|integer",
            "label" => "tarifa acabado",
        ],
        "maquina_id" => [
            "rules" => "required|integer",
            "label" => "maquina",
        ],
        "maquina_tarea_id" => [
            "rules" => "required|integer",
            "label" => "tarea",
        ],
    ];
    public array $tarifa_maquina_extra =
    [
        "tarifa_extra_id" => [
            "rules" => "required|integer",
            "label" => "tarifa acabado",
        ],
        "maquina_id" => [
            "rules" => "required|integer",
            "label" => "maquina",
        ],
        "maquina_tarea_id" => [
            "rules" => "required|integer",
            "label" => "tarea",
        ],
    ];

    public array $orden_trabajo_tarea = [

        "orden_trabajo_tarea_id" => [
            "rules" => "required|integer",
            "label" => "tarea"
        ],
        //   "tiempo_real" => [
        //     "rules" => "required|float",
        //     "label" => "tiempo real"
        //   ]
    ];
    public array $orden_trabajo_date = [
        "orden_trabajo_id" => [
            "rules" => "required|integer",
            "label" => "tarea"
        ],

    ];
    public array $orden_trabajo = [
        "orden_trabajo_id" => [
            "rules" => "required|integer",
            "label" => "Orden trabajo"
        ],

    ];
    public array $chat_department =
    [
        "display" => [
            "rules" => "required|string",
            "label" => "tarifa acabado",
        ],
        "description" => [
            "rules" => "permit_empty",
            "label" => "maquina",
        ],
    ];
}
