"""This module holds the api-related urls for the ``ideas`` app"""

from rest_framework_extensions.routers import ExtendedDefaultRouter

from . import views

router = ExtendedDefaultRouter(trailing_slash=True)

# Router for the ``Brainstorming`` model
brainstormer_router = router.register(r'brainstormings', views.BrainstormingViewSet)

# Routes for the ``BrainstormingIdea`` model
brainstormer_router.register(
    r'ideas',
    views.BrainstormingIdeaViewSet,
    base_name='brainstorming_idea',
    parents_query_lookups=['brainstorming']
)

# Routes for the ``BrainstormingTag`` model
brainstormer_router.register(
    r'tags',
    views.BrainstormingTagViewSet,
    base_name='brainstorming_tag',
    parents_query_lookups=['brainstorming']
)

# Router for the ``QuestionWall`` model
questionwall_router = router.register(r'questionwalls', views.QuestionWallViewSet)

# Routes for the ``QuestionWallIdea`` model
questionwall_router.register(
    r'ideas',
    views.QuestionWallIdeaViewSet,
    base_name='questionwall_idea',
    parents_query_lookups=['questionwall']
)

# Router for the ``WordCloud`` model
wordcloud_router = router.register(r'wordclouds', views.WordCloudViewSet)

# Routes for the ``WordCloudIdea`` model
wordcloud_router.register(
    r'ideas',
    views.WordCloudIdeaViewSet,
    base_name='wordcloud_idea',
    parents_query_lookups=['wordcloud']
)

urlpatterns = router.urls
