/** @type {import('next').NextConfig} */
const nextConfig = {
    reactStrictMode: true,
    trailingSlash: false,
    images: {
        unoptimized: true,
        // admin.fruxinfo.com = blog images (served by the Laravel backend)
        domains: ['fruxinfo.com', 'www.fruxinfo.com', 'admin.fruxinfo.com'],
    },
    eslint: {
        ignoreDuringBuilds: true,
    },

    async redirects() {
        return [
            { source: "/index.php", destination: "/", permanent: true },
            { source: "/blogs/How-to-make-basic-contact-form-in-PHP/", destination: "/blogs/How-to-make-basic-contact-form-in-PHP/", permanent: true },
            { source: "/blog/detail/is-your-website-on-page-1-of-google-if-not-read-this-fruxinfo-private-ltd.html", destination: "/blog/detail/is-your-website-on-page-1-of-google-if-not-read-this-fruxinfo-private-ltd", permanent: true },
            { source: "/blog/detail/mobile-application-development-company-in-ahmedabad-how-flutter-helps-you-build-fast-scalable-mobile-apps.html", destination: "/blog/detail/mobile-application-development-company-in-ahmedabad-how-flutter-helps-you-build-fast-scalable-mobile-apps", permanent: true },
            { source: "/blog/detail/seo-services-in-ahmedabad-fruxinfo-private-ltd.html", destination: "/blog/detail/seo-services-in-ahmedabad-fruxinfo-private-ltd", permanent: true },
            { source: "/blog/detail/web-development-company-in-ahmedabad-a-complete-beginners-guide-by-fruxinfo-private-ltd.html", destination: "/blog/detail/web-development-company-in-ahmedabad-a-complete-beginners-guide-by-fruxinfo-private-ltd", permanent: true },
            { source: "/blog/detail/how-generative-ai-automation-are-transforming-the-it-industry-in-2025.html", destination: "/blog/detail/how-generative-ai-automation-are-transforming-the-it-industry-in-2025", permanent: true },
            { source: "/blog/detail/how-artificial-intelligence-is-changing-the-future-of-technology.html", destination: "/blog/detail/how-artificial-intelligence-is-changing-the-future-of-technology", permanent: true },
            { source: "/blog/detail/why-all-businesses-need-a-website-in-2025-fruxinfo-private-ltd.html", destination: "/blog/detail/why-all-businesses-need-a-website-in-2025-fruxinfo-private-ltd", permanent: true },
            { source: "/blog/detail/why-web-design-is-crucial-for-business-success-in-2025.html", destination: "/blog/detail/why-web-design-is-crucial-for-business-success-in-2025", permanent: true },
            { source: "/blog/detail/top-10-reasons-why-your-business-needs-seo-in-2025-fruxinfo-private-ltd.html", destination: "/blog/detail/top-10-reasons-why-your-business-needs-seo-in-2025-fruxinfo-private-ltd", permanent: true },
            { source: "/blog/detail/top-10-reasons-why-your-business-needs-seo-in-2025-fruxinfo-private-ltd/", destination: "/blog/detail/top-10-reasons-why-your-business-needs-seo-in-2025-fruxinfo-private-ltd", permanent: true },
            { source: "/blog/detail/mobile-application-development-company-in-ahmedabad-how-flutter-helps-you-build-fast-scalable-mobile-apps/", destination: "/blog/detail/mobile-application-development-company-in-ahmedabad-how-flutter-helps-you-build-fast-scalable-mobile-apps", permanent: true },

            // Service pages
            { source: "/search-engine-", destination: "/seo", permanent: true },
            { source: "/graphic-design-", destination: "/graphic-design", permanent: true },
            { source: "/web-design-", destination: "/web-design", permanent: true },
            { source: "/search-engine-optimization-ahmedabad/", destination: "/seo", permanent: true },

            // Main pages
            { source: "/about-us/", destination: "/about", permanent: true },
            { source: "/contact-us/", destination: "/contact", permanent: true },

            // Career — disabled positions → /career
            { source: "/career-web-designer", destination: "/career", permanent: true },
            { source: "/career-social-media-expert", destination: "/career", permanent: true },
            { source: "/career-laravel-developer", destination: "/career", permanent: true },
            { source: "/career-graphic-designer", destination: "/career", permanent: true },
            { source: "/career-quality-analyst", destination: "/career", permanent: true },
            { source: "/career-seo-expert", destination: "/career", permanent: true },
            { source: "/career-ui-ux-designer", destination: "/career", permanent: true },
            { source: "/career-flutter-developer", destination: "/career", permanent: true },
            { source: "/business-development-executive", destination: "/career", permanent: true },

            // Career form pages — disabled positions → /career
            { source: "/web-designer-career-form", destination: "/career", permanent: true },
            { source: "/social-media-expert-career-form", destination: "/career", permanent: true },
            { source: "/laravel-developer-career-form", destination: "/career", permanent: true },
            { source: "/graphic-designer-career-form", destination: "/career", permanent: true },
            { source: "/quality-analyst-career-form", destination: "/career", permanent: true },
            { source: "/seo-expert-career-form", destination: "/career", permanent: true },
            { source: "/ui-ux-designer-career-form", destination: "/career", permanent: true },
            { source: "/flutter-developer-career-form", destination: "/career", permanent: true },

            // Portfolio case studies
            { source: "/website-portfolio/case-study-soulmate-salon", destination: "/case-study-soulmate-salon", permanent: true },
            { source: "/website-portfolio/case-study-autocarxpert", destination: "/case-study-autocarxpert", permanent: true },
            { source: "/website-portfolio/case-study-rklabel", destination: "/case-study-rklabel", permanent: true },
            { source: "/website-portfolio/case-study-medicosurg-solutions", destination: "/case-study-medicosurg-solutions", permanent: true },
            { source: "/website-portfolio/case-study-shreejiprojects", destination: "/case-study-shreejiprojects", permanent: true },
            { source: "/website-portfolio/case-study-promax", destination: "/case-study-promax", permanent: true },
            { source: "/website-portfolio/case-study-4111food", destination: "/case-study-4111food", permanent: true },
            { source: "/website-portfolio/case-study-niyati-makeup", destination: "/case-study-niyati-makeup", permanent: true },
            { source: "/website-portfolio/case-study-irisautomation", destination: "/case-study-irisautomation", permanent: true },
            { source: "/website-portfolio/case-study-convart", destination: "/case-study-convart", permanent: true },
            { source: "/website-portfolio/case-study-finflextax", destination: "/case-study-finflextax", permanent: true },
            { source: "/website-portfolio/case-study-acemica", destination: "/case-study-acemica", permanent: true },
            { source: "/website-portfolio/case-study-winxalpha", destination: "/case-study-winxalpha", permanent: true },
            { source: "/website-portfolio/case-study-twoarchitects", destination: "/case-study-twoarchitects", permanent: true },
            { source: "/website-portfolio/case-study-mydoctorss", destination: "/case-study-mydoctorss", permanent: true },
            { source: "/website-portfolio/case-study-shubhalay", destination: "/case-study-shubhalay", permanent: true },
            { source: "/website-portfolio/case-study-myparkingtag", destination: "/case-study-myparkingtag", permanent: true },
            { source: "/website-portfolio/case-study-megastarfoods", destination: "/case-study-megastarfoods", permanent: true },
        ];
    },
};

module.exports = nextConfig;
