import { Card } 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 (
    <Card title={t("settings.title")}>
      <PhoneNumberConsentList bodyshop={bodyshop} />
    </Card>
  );
}

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