import { Typography } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import PhoneNumberConsentList from "../phone-number-consent/phone-number-consent.component";

const mapStateToProps = createStructuredSelector({
  bodyshop: selectBodyshop
});

const mapDispatchToProps = () => ({});

function ShopInfoConsentComponent({ bodyshop }) {
  const { t } = useTranslation();

  return (
    <div>
      <Typography.Title level={4}>{t("settings.title")}</Typography.Title>
      {<PhoneNumberConsentList bodyshop={bodyshop} />}
    </div>
  );
}

export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoConsentComponent);
