import type { NextPage } from 'next';
import dynamic from 'next/dynamic';

import StrapiSeo from '@/components/common/seo/StrapiSeo';
import { fetchSingleTypePageData } from '@/helpers/utilities/fetchAPI';
const BusinessExcellence = dynamic(() => import('@/components/serviceDetails/businessExcellence/BusinessExcellence'));

const populateFields = [
    'seo.ogImage',
    'seo.multiStructureData',
    'developmentService.service.logo',
    'secureWeb.image',
    'benefit.image',
];

export async function getStaticProps() {
    return await fetchSingleTypePageData(populateFields, 'business-page');
}

const BusinessAnalyticsPage: NextPage = ({ data }: any) => {
    return (
        <>
            <StrapiSeo content={data.data?.attributes?.seo} />
            <BusinessExcellence data={data.data?.attributes} />
        </>
    );
};

export default BusinessAnalyticsPage;
