import React from "react";
import { useTranslation } from "react-i18next";
import HorizontalTabs from "../../../components/common/HorizionalTabs";
import Tab from "../../../components/common/Tab";
import GeneralTab from "./components/GeneralTab";

interface UserDetailsProps {
  editMode: boolean;
}

const UserDetails: React.FC<UserDetailsProps> = ({ editMode }) => {
  const { t } = useTranslation();

  const heading = editMode ? t("EditUser") : t("AddUser");

  const tabs: JSX.Element[] = [
    <Tab key={1} label={t("General")}>
      <GeneralTab isEditMode={editMode} />
    </Tab>,
  ];

  return (
    <div>
      <h1>{heading}</h1>
      <HorizontalTabs>{tabs}</HorizontalTabs>
    </div>
  );
};

export default UserDetails;
