"""
{{ name | pascal_case }} Guard.
This is automatically generated by FletX CLI.
Customize this guard as needed.
"""

from typing import Optional

from fletx.navigation import RouteGuard, RouteInfo      # type: ignore
from fletx.utils import get_logger      # type: ignore


class {{ name | pascal_case }}Guard(RouteGuard):
    """{{ name | pascal_case }} Guard."""
    
    def __init__(self):
        self._logger = get_logger('FletX.ConfirmNavigationGuard')
    
    async def can_activate(self, route_info: RouteInfo) -> bool:
        """Called before entering the route."""
        
        return True
    
    async def can_deactivate(self, current_route: RouteInfo) -> bool:
        """Called before leaving the route."""

        return True
    
    async def redirect_to(self, route_info: RouteInfo) -> Optional[str]:
        """Redirect to another route if needed."""
        
        return None
    