from django.urls import path

from . import views
from .tactical_analysis import TacticalCatalogView, TacticalAnalysisView
from .fixtures_api import CompetitionFixturesView
from .friendly_api import FriendliesView, FriendlyOptionsView, FriendlyDetailView, FriendlyActionView

app_name = "matches"

urlpatterns = [
    path("tactics/catalog/", TacticalCatalogView.as_view()),
    path("tactics/analyze/<uuid:club_id>/", TacticalAnalysisView.as_view()),
    path("friendlies/", FriendliesView.as_view(), name="friendlies"),
    path("friendlies/options/", FriendlyOptionsView.as_view(), name="friendly-options"),
    path("friendlies/<uuid:game_id>/", FriendlyDetailView.as_view(), name="friendly-detail"),
    path("friendlies/<uuid:game_id>/actions/", FriendlyActionView.as_view(), name="friendly-action"),
    path("fixtures/", CompetitionFixturesView.as_view(), name="competition-fixtures"),
    path("mine/", views.MyMatchesView.as_view(), name="my-matches"),
    path("<uuid:match_id>/lineups/<uuid:club_id>/", views.MatchLineupView.as_view(), name="lineup-detail"),
    path("<uuid:match_id>/lineups/<uuid:club_id>/submit/", views.MatchLineupSubmitView.as_view(), name="lineup-submit"),
    path("<uuid:match_id>/lineups/<uuid:club_id>/reopen/", views.MatchLineupReopenView.as_view(), name="lineup-reopen"),
    path("<uuid:match_id>/lineups/<uuid:club_id>/set-pieces/", views.MatchSetPiecePlanView.as_view(), name="set-piece-plan"),
    path("<uuid:match_id>/analytics/", views.MatchAdvancedAnalyticsView.as_view(), name="advanced-analytics"),
    path("<uuid:match_id>/environment/", views.MatchEnvironmentEvidenceView.as_view(), name="environment-evidence"),
    path("<uuid:match_id>/medical/", views.MatchMedicalEvidenceView.as_view(), name="medical-evidence"),
    path("<uuid:match_id>/defensive/", views.MatchDefensiveMechanicsView.as_view(), name="defensive-mechanics"),
    path("<uuid:match_id>/possession/", views.MatchPossessionMechanicsView.as_view(), name="possession-mechanics"),
    path("<uuid:match_id>/pressing/", views.MatchPressingMechanicsView.as_view(), name="pressing-mechanics"),
    path("<uuid:match_id>/off-ball/", views.MatchOffBallMechanicsView.as_view(), name="off-ball-mechanics"),
    path("<uuid:match_id>/goalkeeper-distribution/", views.MatchGoalkeeperDistributionMechanicsView.as_view(), name="goalkeeper-distribution-mechanics"),
    path("<uuid:match_id>/live/", views.LiveMatchStateView.as_view(), name="live-state"),
    path("<uuid:match_id>/live/commands/", views.LiveMatchCommandView.as_view(), name="live-command"),
    path("<uuid:match_id>/live/prepare/", views.LiveMatchPrepareView.as_view(), name="live-prepare"),
    path("<uuid:match_id>/live/advance/", views.LiveMatchAdvanceView.as_view(), name="live-advance"),
    path("<uuid:match_id>/live/sync/", views.LiveMatchSyncView.as_view(), name="live-sync"),
    path("<uuid:match_id>/live/spectator/", views.LiveMatchSpectatorStateView.as_view(), name="live-spectator"),
    path("<uuid:match_id>/live/stream/", views.LiveMatchStreamView.as_view(), name="live-stream"),
]
