import React from "react";
import { useTranslation } from "react-i18next";
import AlertComponent from "../alert/alert.component";
import ProfileMyComponent from "../profile-my/profile-my.component";
import ProfileShopsContainer from "../profile-shops/profile-shops.container";

export default function ProfileContent({ sidebarSelection }) {
  const { t } = useTranslation();

  switch (sidebarSelection.key) {
    case "profile":
      return <ProfileMyComponent />;
    case "shops":
      return <ProfileShopsContainer />;
    default:
      return (
        <AlertComponent message={t("profile.errors.state")} type="error" />
      );
  }
}
