from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
app_name = 'core'
from . import views
urlpatterns = [
    path('follow-community/', views.follow_community, name='follow_community'),
    path('community/following', views.community_following, name='community_following'),
    path('community/details/<int:id>/', views.community_details, name='community_details'),
    path('inappropiate-post/<int:forum_id>/<int:community_id>', views.create_inappropiate_post, name='create_inappropiate_post'),
    path('add-community-content/<int:id>', views.add_communitycontent, name='add_communitycontent'),
    path('publish-content/<int:cid>/<str:image>/<str:content>', views.publish_communitycontent, name='publish_communitycontent'),
    path('add-like', views.add_like, name='add_like'),
    path('add-usercomment/<int:forum_id>', views.add_usercomment, name='add_usercomment'),
    path('edit-usercomment/<int:id>', views.comment_edit, name='comment_edit'),
    path('delete-comment/<int:id>', views.comment_delete, name='comment_delete'),
    path('api/get_places/', views.get_places, name='get_places'),
    path('team-default', views.team_default, name='team_default'),
    path('create-team', views.create_team, name='create_team'),
    path('team-details/<int:id>', views.team_details, name='team_details'),
    path('team-update/<int:id>', views.team_update, name='team_update'),
    path('joining-team-request/<int:team_id>/<int:team_admin_id>', views.joining_team_request, name='joining_team_request'),
    path('invaitation-accept/<int:team_id>/<int:invite_id>', views.invaitation_accept, name='invaitation_accept'),
    path('invaitation-decline/<int:team_id>/<int:invite_id>', views.invaitation_decline, name='invaitation_decline'),
    path('notification', views.notification_list, name='notification_list'),
    path('notification-details/<int:id>', views.notification_details, name='notification_details'),
    path('search-team-player/<int:cid>', views.search_team_player, name='search_team_player'),
    path('player-profile/<int:id>', views.player_profile, name='player_profile'),
    path('player-profile-update/', views.player_profile_update, name='player_profile_update'),
    path('send-friend-request/<int:recever_id>', views.send_friend_request, name='send_friend_request'),
    path('cancel-friend-request/<int:recever_id>', views.friend_request_cancel, name='friend_request_cancel'),
    path('friend-request-accept/<int:sender_id>/<int:request_id>', views.friend_request_accept, name='friend_request_accept'),
    path('friend-request-decline/<int:sender_id>/<int:request_id>', views.friend_request_decline, name='friend_request_decline'),
    path('tournament_redirect/', views.tournament_redirect, name='tournament_redirect'),
    path("<str:username>/tournaments/my_tournaments/", views.tournament_mytournament, name="mytournament"),
    path("<str:username>/tournaments/challenges/", views.tournament_challenges, name="challenges"),
    path("<str:username>/tournaments/invites/", views.tournament_invites, name="invites"),
    path("<str:username>/create-tournament/<str:tournament_pk>/", views.create_tournament, name="create_tournament"),
    path("<str:username>/<str:tournament_pk>/tournament-invite/", views.edit_tournament, name="edit_tournament"),
    path("save_new_tournament", views.save_new_tournament, name="save_new_tournament"),
    path("tournament_admin_start/<str:username>/<str:tournament_pk>", views.tournament_admin_start, name="tournament_admin_start"),
    path("tournament_start/waiting/<str:username>/<str:tournament_pk>", views.tournament_start_waiting, name="tournament_waiting"),
    path("tournament_dashboard/<str:username>/<str:tournament_pk>", views.game_livestream_dashboard, name="game_livestream_dashboard"),
    path("livestream/<str:tournament_pk>/<str:username>", views.livestream_view_page, name="livestream_view_page"),
    path("end_game/<str:tournament_pk>/<str:username>/<str:prev_round>", views.end_game, name="end_game"),
    path('video_feed/<str:username>/<str:tournament_pk>/', views.video_feed, name='video_feed'),
    path('screen_feed/<str:username>/<str:tournament_pk>/', views.screen_feed, name='screen_feed'),
    path('video_feed_host/<str:username>/<str:tournament_pk>/', views.video_feed_host, name='video_feed_host'),
    path('screen_feed_host/<str:username>/<str:tournament_pk>/', views.screen_feed_host, name='screen_feed_host'),
    path('update_points', views.update_points, name='update_points'),
    path('test/', views.test, name="test"),
    path('save_chat_message/', views.save_chat_message, name='save_chat_message'),
    path('update_livestream_messages/', views.update_livestream_messages, name='update_livestream_messages'),
    path('', views.all_tournaments, name='home'),
    path('challenge_team/', views.challenge_team, name='challenge_team'),
    path('invite_teammember/', views.invite_teammember, name='invite_teammember'),
    path('list_teams/', views.list_teams, name='list_teams'),
    path('invite_to_tournament/<str:username>/<str:tournament_pk>/', views.challenged_team_invite_teammembers, name='challenged_team_invite_teammembers'),
    path('team_viewer_page/<str:team_pk>', views.team_viewer_page, name="team_viewer_page"),
    path('subscribe_to_team', views.subscribe_to_team, name="subscribe_to_team")
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
