using System;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Animation;
using Wino.Core.Domain.Models.Navigation;

namespace Wino.Core.WinUI.Services;

public class NavigationServiceBase
{
    public NavigationTransitionInfo GetNavigationTransitionInfo(NavigationTransitionType transition)
    {
        return transition switch
        {
            NavigationTransitionType.DrillIn => new DrillInNavigationTransitionInfo(),
            NavigationTransitionType.Entrance => new EntranceNavigationTransitionInfo(),
            _ => new SuppressNavigationTransitionInfo(),
        };
    }

    public Type GetCurrentFrameType(ref Frame _frame)
    {
        if (_frame != null && _frame.Content != null)
            return _frame.Content.GetType();

        return null;
    }
}
