// import MicrosoftPowerTools from '@/components/microsoftPowerTools/MicrosoftPowerTools'
import { NextPage } from 'next';
import dynamic from 'next/dynamic';
import StrapiSeo from '@/components/common/seo/StrapiSeo';
import { fetchSingleTypePageData } from '@/helpers/utilities/fetchAPI';
const MicrosoftPowerTools = dynamic(() => import('@/components/microsoftPowerTools/MicrosoftPowerTools'));

const populateFields = [
    'seo.ogImage',
    'seo.multiStructureData',
    'hero.buttonIcon',
    'hero.bottomImages',
    'brandLogo.logo',
    'overview.powerOverviewCard.image',
    'Service.serviceList.image',
    'tabs.tabs.icon',
    'tabs.tabs.bigImage',
    'Slider.ThreeDSlider.icon',
    'Slider.ThreeDSlider.image',
    'whyUs.toolTipCard.icon',
    'WhyChoose.chooseCard.image',
    'FAQ.FAQ.icon',
    'caseStudies.cardImage',
    'clients.brandLogos.brands.logo',
];

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

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

export default MicrosoftPowerToolsPage;
