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

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

const populateFields = [
    'seo.ogImage',
    'seo.multiStructureData',
    'hero.bottomImages',
    'hero.buttonIcon',
    'leftRightCom.card.image',
    'leftRightCom.card.icon',
    'acrossPlatform.content.icon',
    'brandLogos.brands.logo',
    'caseStudies.cardImage',
    'productivity.tabs.bigImage',
    'productivity.tabs.icon',
    'developmentService.service.logo',
    'nextGen.tabs.icon',
    'nextGen.tabs.bigImage',
    'techStack.techStack.logo',
    'industry.chooseCard.image',
    'processData',
    'chooseUs.content.image',
    'faq.FAQ.icon',
    'clients.brandLogos.brands.logo',
];

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

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

export default MobileAppDevelopmentPage;
