﻿import React, { Fragment, memo } from 'react';
//Componentes
import Botones from '../../components/UI/botonera/headerBotones.js';
import CajaTexto from '../../components/UI/cajaTexto/cajaTexto.jsx';
import CajaTRexto from '../../components/UI/cajaTexto/cajaTexto.jsx';
import TextArea from '../../components/UI/textArea/textArea.jsx';
import CajaTextoNumero from '../../components/UI/cajaTexto/cajaTextoNumero.jsx';
import CajaTextoBusqueda from '../../components/UI/cajaTexto/cajaTextoBusqueda.jsx';
import CheckBox from '../../components/UI/checkBox/checkBox.jsx';
import Division from '../../components/UI/division/division.jsx'
import ComboBox from '../../components/UI/comboBox/combobox.jsx';

export function generalesInt(props) {
    return (
        <Fragment>
            <div className="col-md-12">
                <div className='row'>
                    <div className="col-md-6">
                        <h1>{props.Titulo}</h1>
                    </div>
                    <div className="col-md-6 text-right">
                        <div className="acciones">
                            <Botones
                                botones={props.botones}
                            />
                        </div>
                    </div>
                </div>
                <div className="content">
                    <div className="content-box box-primary">
                        <div className='row'>
                            <CajaTexto col="4" id="UbicacionFotos" type="text" label={props.Datos.UbicacionFotos.attributes.label} value={props.Datos.UbicacionFotos.value} attributes={props.Datos.UbicacionFotos.attributes} onChangeInput={props.onChangeInput} />
                            <CajaTextoNumero col="4" id="ImpresionesAccionPersonal" type="number" label={props.Datos.ImpresionesAccionPersonal.attributes.label} value={props.Datos.ImpresionesAccionPersonal.value} attributes={props.Datos.ImpresionesAccionPersonal.attributes} onChangeInput={props.onChangeInputInt} onBlur={props.onChangeEditar} onFocus={props.onChangeEditar} onFormatear={props.onFormatoInt} />
                            <CheckBox id='ControlaCantidadPlazaOficinas' col="4" attributes={props.Datos.ControlaCantidadPlazaOficinas.attributes} value={props.Datos.ControlaCantidadPlazaOficinas.value} label={props.Datos.ControlaCantidadPlazaOficinas.attributes.label} onChange={props.handleCheckBox} />
                        </div>
                        <div className='row'>
                            <CheckBox id='MuestraDiasVacaciones' col="4" attributes={props.Datos.MuestraDiasVacaciones.attributes} value={props.Datos.MuestraDiasVacaciones.value} label={props.Datos.MuestraDiasVacaciones.attributes.label} onChange={props.handleCheckBox} />
                            <CheckBox id='MuestraAntiguedad' col="4" attributes={props.Datos.MuestraAntiguedad.attributes} value={props.Datos.MuestraAntiguedad.value} label={props.Datos.MuestraAntiguedad.attributes.label} onChange={props.handleCheckBox} />
                            <CheckBox id='Permite_Indicar_Beneficiario' col="4" attributes={props.Datos.Permite_Indicar_Beneficiario.attributes} value={props.Datos.Permite_Indicar_Beneficiario.value} label={props.Datos.Permite_Indicar_Beneficiario.attributes.label} onChange={props.handleCheckBox} />
                        </div>
                        <div className='row'>
                            <CheckBox id='Permite_Vacacion_Fraccionada' col="4" attributes={props.Datos.Permite_Vacacion_Fraccionada.attributes} value={props.Datos.Permite_Vacacion_Fraccionada.value} label={props.Datos.Permite_Vacacion_Fraccionada.attributes.label} onChange={props.handleCheckBox} />                            
                        </div>
                        <div className="row">
                            <CheckBox id='Habilita_GuardadoNube' col="4" attributes={props.Datos.Habilita_GuardadoNube.attributes} value={props.Datos.Habilita_GuardadoNube.value} label={props.Datos.Habilita_GuardadoNube.attributes.label} onChange={props.handleCheckBox} />
                        </div>
                        <div className='row'>
                            <CajaTexto col="4" id="Cadena_Conexion_AzureBlobStorage" type="text" label={props.Datos.Cadena_Conexion_AzureBlobStorage.attributes.label} value={props.Datos.Cadena_Conexion_AzureBlobStorage.value} attributes={props.Datos.Cadena_Conexion_AzureBlobStorage.attributes} onChangeInput={props.onChangeInput} />
                            <CajaTexto col="4" id="Nombre_Contenedor_AzureBlobStorage" type="text" label={props.Datos.Nombre_Contenedor_AzureBlobStorage.attributes.label} value={props.Datos.Nombre_Contenedor_AzureBlobStorage.value} attributes={props.Datos.Nombre_Contenedor_AzureBlobStorage.attributes} onChangeInput={props.onChangeInput} />
                            <CajaTexto col="4" id="URL_ServicioArchivos" type="text" label={props.Datos.URL_ServicioArchivos.attributes.label} value={props.Datos.URL_ServicioArchivos.value} attributes={props.Datos.URL_ServicioArchivos.attributes} onChangeInput={props.onChangeInput} />
                        </div>
                        <div className='row'>
                            <CajaTexto col="4" id="Nivel1_Nombre" type="text" label={props.Datos.Nivel1_Nombre.attributes.label} value={props.Datos.Nivel1_Nombre.value} attributes={props.Datos.Nivel1_Nombre.attributes} onChangeInput={props.onChangeInput} />
                            <CajaTexto col="4" id="Nivel2_Nombre" type="text" label={props.Datos.Nivel2_Nombre.attributes.label} value={props.Datos.Nivel2_Nombre.value} attributes={props.Datos.Nivel2_Nombre.attributes} onChangeInput={props.onChangeInput} />
                            <CajaTexto col="4" id="Nivel3_Nombre" type="text" label={props.Datos.Nivel3_Nombre.attributes.label} value={props.Datos.Nivel3_Nombre.value} attributes={props.Datos.Nivel3_Nombre.attributes} onChangeInput={props.onChangeInput} />
                        </div>

                        <div className="row">
                            <Division id="DivValidaP" label={props.Datos.DivValidaP.attributes.label} attributes={props.Datos.DivValidaP.attributes} />
                        </div>                        
                        <div className='row'>
                            <CheckBox id='ValidaSalariosPuesto' col="12" attributes={props.Datos.ValidaSalariosPuesto.attributes} value={props.Datos.ValidaSalariosPuesto.value} label={props.Datos.ValidaSalariosPuesto.attributes.label} onChange={props.handleCheckBox} />
                        </div> 


                        <div className="row">
                            <Division id="DivControlMarcas" label={props.Datos.DivControlMarcas.attributes.label} attributes={props.Datos.DivControlMarcas.attributes} />
                        </div>
                        <div className="row">
                            <CheckBox col="4" id="ProcAutoConJus" attributes={props.Datos.ProcAutoConJus.attributes} value={props.Datos.ProcAutoConJus.value} label={props.Datos.ProcAutoConJus.attributes.label} onChange={props.handleCheckBox} />
                            <ComboBox col="4" id="selectedOptionTipoJustificacion" attributes={props.Datos.ProcAutoConJusId.attributes} value={props.selectedOptionTipoJustificacion} datos={props.listaTipoJustificacion} onChange={props.handleSelectTipoJustificacion} label={props.Datos.ProcAutoConJusId.attributes.label} />
                        </div>




                        <div className="row">
                            <Division id="DivPruebas" label={props.Datos.DivPruebas.attributes.label} attributes={props.Datos.DivPruebas.attributes} />
                        </div>                        
                        <div className='row'>
                            <CheckBox id='Periodo_Pruebas' col="12" attributes={props.Datos.Periodo_Pruebas.attributes} value={props.Datos.Periodo_Pruebas.value} label={props.Datos.Periodo_Pruebas.attributes.label} onChange={props.handleCheckBox} />
                        </div>
                        <div className='row'>
                        <CajaTextoNumero col="6" id="Dias_Periodo_Pruebas" type="number" label={props.Datos.Dias_Periodo_Pruebas.attributes.label} value={props.Datos.Dias_Periodo_Pruebas.value} attributes={props.Datos.Dias_Periodo_Pruebas.attributes} onChangeInput={props.onChangeInputInt} onBlur={props.onChangeEditar} onFocus={props.onChangeEditar} onFormatear={props.onFormatoInt} />
                        <CajaTextoNumero col="6" id="Dias_Previos_Pruebas" type="number" label={props.Datos.Dias_Previos_Pruebas.attributes.label} value={props.Datos.Dias_Previos_Pruebas.value} attributes={props.Datos.Dias_Previos_Pruebas.attributes} onChangeInput={props.onChangeInputInt} onBlur={props.onChangeEditar} onFocus={props.onChangeEditar} onFormatear={props.onFormatoInt} />
                        </div>    
                        <div className='row'>
                            <TextArea col="12" id="Correos_Periodo_Pruebas" label={props.Datos.Correos_Periodo_Pruebas.attributes.label} value={props.Datos.Correos_Periodo_Pruebas.value} attributes={props.Datos.Correos_Periodo_Pruebas.attributes} onChangeInput={props.onChangeInput} />
                        </div>                                                                    
                    </div>
                </div>
            </div>

        </Fragment>
    );
};
export default memo(generalesInt);