import {parse} from "next-useragent";
import DashboardRoleManagementComponent from "@/components/dashboard/role-management";

export default function RoleManagement() {
    return (
        <DashboardRoleManagementComponent/>
    );
}

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.role_management_page",
            isBot,
            locale,
            layout: {name: 'DashboardLayout', props: {permissions: ["manage_roles"]}}
        },
    };
}
