import { connect } from "react-redux";
import HeaderComponent from "./header.component";

// const mapDispatchToProps = (dispatch) => ({
//   setUserLanguage: (language) => dispatch(setUserLanguage(language))
// });

// setUserLanguage was removed from signature because it is not used in the component, and it is throwing a deprecation warning
export function HeaderContainer() {
  // Commented out the handleMenuClick function because it is not used in the component, and it is throwing a deprecation warning

  /*  const handleMenuClick = (e) => {
    if (e.item.props.actiontype === "lang-select") {
      i18next.changeLanguage(e.key, (err, t) => {
        if (err) {
          logImEXEvent("language_change_error", { error: err });

          return console.log("Error encountered when changing languages.", err);
        }
        logImEXEvent("language_change", { language: e.key });

        setUserLanguage(e.key);
      });
    }
  };*/
  // return <HeaderComponent handleMenuClick={handleMenuClick} />;

  return <HeaderComponent />;
}

export default connect(null, null)(HeaderContainer);
