import { useState } from "react"; import Managed from "@/components/Settings/Manager/AccountManager/Management/Managed"; import Unmanaged from "@/components/Settings/Manager/AccountManager/Management/Unmanaged"; import { Button, Modal, Tabs } from "@/components/Shared/UI"; import AddAccountManager from "./AddAccountManager"; import Managers from "./Managers"; enum Type { MANAGED = "MANAGED", MANAGERS = "MANAGERS", UNMANAGED = "UNMANAGED" } const AccountManager = () => { const [type, setType] = useState(Type.MANAGERS); const [showAddManagerModal, setShowAddManagerModal] = useState(false); const tabs = [ { name: "Managers", type: Type.MANAGERS }, { name: "Managed", type: Type.MANAGED }, { name: "Un-managed", type: Type.UNMANAGED } ]; return (
{ const nextType = tabType as Type; setType(nextType); }} tabs={tabs} /> {type === Type.MANAGERS && ( <> setShowAddManagerModal(false)} show={showAddManagerModal} title="Add Account Manager" > )}
{type === Type.MANAGERS && } {type === Type.MANAGED && } {type === Type.UNMANAGED && }
); }; export default AccountManager;