import React, { Suspense } from 'react';
import type { Metadata } from 'next';
import { unstable_setRequestLocale } from 'next-intl/server';
import { useTranslations } from 'next-intl';
import { ProfileSettings } from '../../../../../components/Account';
import { i18nText } from '../../../../../i18nKeys';

export const metadata: Metadata = {
    title: 'Bbuddy - Account - Profile Settings',
    description: 'Bbuddy desc Profile settings'
};

export default function Settings({ params: { locale } }: { params: { locale: string } }) {
    unstable_setRequestLocale(locale);
    const t = useTranslations('Account.Settings');

    return (
        <>
            <ol className="breadcrumb">
                <li className="breadcrumb-item active" aria-current="page">{i18nText('accountMenu.settings', locale)}</li>
            </ol>
            <Suspense>
                <ProfileSettings locale={locale} />
            </Suspense>
        </>
    );
};
