from rest_framework import generics

from common.views import (
    APIKeyAuthentication,
    DashboardTokenAuthentication,
    StandardSetPagination,
)
from .interactive_content_models import (
    InteractiveContent,
    InteractiveContentSocialMedia,
    InteractiveContentSocialMediaLanguage,
    InteractiveContentSocialMediaOptions,
    InteractiveContentSocialMediaOptionsLanguage,
    InteractiveContentSocialMediaHashtags,
    InteractiveContentSocialMediaHashtagsLanguage,
    InteractiveContentAppContent,
    InteractiveContentAppContentLanguage,
    InteractiveContentAppContentOptions,
    InteractiveContentAppContentOptionsLanguage,
)
from .interactive_content_serializers import (
    InteractiveContentSerializer,
    InteractiveContentSocialMediaSerializer,
    InteractiveContentSocialMediaLanguageSerializer,
    InteractiveContentSocialMediaOptionsSerializer,
    InteractiveContentSocialMediaOptionsLanguageSerializer,
    InteractiveContentSocialMediaHashtagsSerializer,
    InteractiveContentSocialMediaHashtagsLanguageSerializer,
    InteractiveContentAppContentSerializer,
    InteractiveContentAppContentLanguageSerializer,
    InteractiveContentAppContentOptionsSerializer,
    InteractiveContentAppContentOptionsLanguageSerializer,
)


class InteractiveContentListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContent.objects.all().order_by("id")
    serializer_class = InteractiveContentSerializer


class InteractiveContentDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContent.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentSerializer


class InteractiveContentSocialMediaListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMedia.objects.all().order_by("id")
    serializer_class = InteractiveContentSocialMediaSerializer


class InteractiveContentSocialMediaDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMedia.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentSocialMediaSerializer


class InteractiveContentSocialMediaLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaLanguage.objects.all().order_by("id")
    serializer_class = InteractiveContentSocialMediaLanguageSerializer


class InteractiveContentSocialMediaLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaLanguage.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentSocialMediaLanguageSerializer


class InteractiveContentSocialMediaOptionsListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaOptions.objects.all().order_by("id")
    serializer_class = InteractiveContentSocialMediaOptionsSerializer


class InteractiveContentSocialMediaOptionsDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaOptions.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentSocialMediaOptionsSerializer


class InteractiveContentSocialMediaOptionsLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaOptionsLanguage.objects.all().order_by("id")
    serializer_class = InteractiveContentSocialMediaOptionsLanguageSerializer


class InteractiveContentSocialMediaOptionsLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaOptionsLanguage.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentSocialMediaOptionsLanguageSerializer


class InteractiveContentSocialMediaHashtagsListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaHashtags.objects.all().order_by("id")
    serializer_class = InteractiveContentSocialMediaHashtagsSerializer


class InteractiveContentSocialMediaHashtagsDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaHashtags.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentSocialMediaHashtagsSerializer


class InteractiveContentSocialMediaHashtagsLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaHashtagsLanguage.objects.all().order_by("id")
    serializer_class = InteractiveContentSocialMediaHashtagsLanguageSerializer


class InteractiveContentSocialMediaHashtagsLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentSocialMediaHashtagsLanguage.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentSocialMediaHashtagsLanguageSerializer


class InteractiveContentAppContentListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContent.objects.all().order_by("id")
    serializer_class = InteractiveContentAppContentSerializer


class InteractiveContentAppContentDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContent.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentAppContentSerializer


class InteractiveContentAppContentLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContentLanguage.objects.all().order_by("id")
    serializer_class = InteractiveContentAppContentLanguageSerializer


class InteractiveContentAppContentLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContentLanguage.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentAppContentLanguageSerializer


class InteractiveContentAppContentOptionsListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContentOptions.objects.all().order_by("id")
    serializer_class = InteractiveContentAppContentOptionsSerializer


class InteractiveContentAppContentOptionsDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContentOptions.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentAppContentOptionsSerializer


class InteractiveContentAppContentOptionsLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContentOptionsLanguage.objects.all().order_by("id")
    serializer_class = InteractiveContentAppContentOptionsLanguageSerializer


class InteractiveContentAppContentOptionsLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = InteractiveContentAppContentOptionsLanguage.objects.all()
    lookup_field = "id"
    serializer_class = InteractiveContentAppContentOptionsLanguageSerializer
