"""
Refactored survey handlers with improved structure and error handling.

This module contains the main survey flow handlers, refactored from the original
survey.py file with better separation of concerns, error handling, and type safety.
"""
import asyncio
import contextlib
import logging
from typing import Dict, Any, Optional, Union

from aiogram import Router
from aiogram.fsm.context import FSMContext

from src.bot.handlers.survey_handlers import router as survey_router
from src.bot.handlers.strategy_review import router as review_router
from src.bot.handlers.strategy_management import router as management_router
from src.bot.handlers.wipe_handlers import router as wipe_router
from src.bot.utils.error_handling import handle_errors, ErrorHandler

logger = logging.getLogger(__name__)

# Main router that combines all survey-related routers
router = Router(name="survey_main")

# Include all sub-routers
router.include_router(survey_router)
router.include_router(review_router)
router.include_router(management_router)
router.include_router(wipe_router)


# Error handler removed to fix TypeError


# Export the main router for use in the bot
__all__ = ['router']
