import React, { Component } from "react";
import { withRouter, } from "react-router-dom";
import EmailPage from './datosContacto/email.page'
import PhonePage from './datosContacto/telefono.page'
import WhatsappPage from './datosContacto/whatsapp.page'
import { Row, Col, Tooltip, OverlayTrigger, Form, } from 'react-bootstrap'

class TraductorSidebarPage extends Component {
  constructor(props) {
    super(props);
    this.state = {  }
  }

  componentDidMount() {
    
  }

  render() {

    const { translate,arrCheck } = this.props.initState;

    return (
      <div style={{ padding: 15, background: '#f3f3f3', }}>
        <div className="mb-3" style={{ marginTop: 10, }}>
            <Form.Check 
              type={'checkbox'}
              id={`available-traductor`}
              label={`Habilitar Traductor de Google`}
              checked={translate}
              onChange={ 
                (event) => { 
                  const newState = {...this.props.initState};
                  newState.arrCheck[10] = { title: 'traductor', checkMark: !translate };
                  this.initsetState({
                    newState,
                    translate : !translate
                  })
                }
              }
            />

      </div>
      </div>
    );
  }

  initsetState(param) {
    this.props.initsetState(param)
    return true
  }

};

export default withRouter(TraductorSidebarPage)












