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

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

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

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

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

export default AIAndMLSolutionsPage;
