import {parse} from "next-useragent";
import DashboardUserManagementComponent from "@/components/dashboard/user-management";

export default function UserManagement() {
    return (
        <DashboardUserManagementComponent/>
    );
}

export async function getServerSideProps({req, locale}) {
    const {isBot} = parse(req.headers["user-agent"]);
    return {
        props: {
            messages: (await import(`&/locales/${locale}/app.json`)).default,
            title: "Dashboard.user_management_page",
            isBot,
            locale,
            layout: {name: 'DashboardLayout', props: {permissions: ["manage_users"]}}
        },
    };
}
