import ProductionBoardKanbanContainer from "../../components/production-board-kanban/production-board-kanban.container";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";

const mapStateToProps = createStructuredSelector({
  //currentUser: selectCurrentUser
  bodyshop: selectBodyshop
});
const mapDispatchToProps = () => ({
  //setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(mapStateToProps, mapDispatchToProps)(ProductionBoardComponent);

export function ProductionBoardComponent({ bodyshop }) {
  const {
    treatments: { Production_Use_View }
  } = useTreatmentsWithConfig({
    attributes: {},
    names: ["Production_Use_View"],
    splitKey: bodyshop?.imexshopid
  });

  return <ProductionBoardKanbanContainer subscriptionType={Production_Use_View.treatment} />;
}
