import { Result } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";

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

export function ShopSubStatus({ bodyshop }) {
  const { t } = useTranslation();
  const { sub_status } = bodyshop;
  // ‘expired’ ‘trail-expired' are the valid sub_status values
  return <Result status="403" title={t(`general.errors.sub_status.${sub_status}`)} />;
}
