import 'package:flutter/material.dart';
import 'package:tanami_app/core/styles/app_images.dart';
import 'package:tanami_app/core/styles/app_text.dart';

import 'build_onboarding_page_widget.dart';

Widget buildPage(
    BuildContext context, int index, PageController pageController) {
  switch (index) {
    case 0:
      return buildOnboardingPage(
        pageController: pageController,
        index: index,
        context,
        imageAsset: AppImages.firstWelcome,
        title: AppText.welcomeTitle1Text,
        description: AppText.weclomeDescription1Text,
      );
    case 1:
      return buildOnboardingPage(
        pageController: pageController,
        index: index,
        context,
        imageAsset: AppImages.secondWelcome,
        title: AppText.welcomeTitle2Text,
        description: AppText.weclomeDescription2Text,
      );
    case 2:
      return buildOnboardingPage(
        pageController: pageController,
        index: index,
        context,
        imageAsset: AppImages.thirdWelcome,
        title: AppText.welcomeTitle3Text,
        description: AppText.weclomeDescription3Text,
        isLastPage: true,
      );
    default:
      return Container();
  }
}
