import 'package:flutter/cupertino.dart';
import 'package:kasy_kit/core/navigation/kasy_navigation_config.dart';
import 'package:kasy_kit/core/navigation/kasy_route_transition.dart';

class OnboardingRouteTransition extends CupertinoPageRoute<void> {
  OnboardingRouteTransition({
    required super.builder,
    super.settings,
  });

  @override
  Duration get transitionDuration => KasyNavigationConfig.duration;

  @override
  Duration get reverseTransitionDuration =>
      KasyNavigationConfig.reverseDuration;

  @override
  Widget buildTransitions(
    BuildContext context,
    Animation<double> animation,
    Animation<double> secondaryAnimation,
    Widget child,
  ) {
    return kasyBuildRouteTransition(
      context: context,
      animation: animation,
      secondaryAnimation: secondaryAnimation,
      child: child,
      kind: KasyNavigationConfig.onboardingStep,
    );
  }
}
