import {parse} from "next-useragent";
import DashboardAdminSettingComponent from "@/components/dashboard/admin-setting";

export default function AdminSetting() {
    return (
        <DashboardAdminSettingComponent/>
    );
}

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