from rest_framework import generics

from common.views import (
    APIKeyAuthentication,
    DashboardTokenAuthentication,
    StandardSetPagination,
)
from .education_content_models import (
    EducationContent,
    EducationContentSocialMedia,
    EducationContentSocialMediaLanguage,
    EducationContentSocialMediaImageText,
    EducationContentSocialMediaImageTextLanguage,
    EducationContentSocialMediaHashtags,
    EducationContentSocialMediaHashtagsLanguage,
    EducationContentAppContent,
    EducationContentAppContentLanguage,
    EducationContentAppContentWhatYouShouldKnow,
    EducationContentAppContentWhatYouShouldKnowLanguage,
)
from .education_content_serializers import (
    EducationContentSerializer,
    EducationContentSocialMediaSerializer,
    EducationContentSocialMediaLanguageSerializer,
    EducationContentSocialMediaImageTextSerializer,
    EducationContentSocialMediaImageTextLanguageSerializer,
    EducationContentSocialMediaHashtagsSerializer,
    EducationContentSocialMediaHashtagsLanguageSerializer,
    EducationContentAppContentSerializer,
    EducationContentAppContentLanguageSerializer,
    EducationContentAppContentWhatYouShouldKnowSerializer,
    EducationContentAppContentWhatYouShouldKnowLanguageSerializer,
)


class EducationContentListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContent.objects.all().order_by("id")
    serializer_class = EducationContentSerializer


class EducationContentDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContent.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentSerializer


class EducationContentSocialMediaListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMedia.objects.all().order_by("id")
    serializer_class = EducationContentSocialMediaSerializer


class EducationContentSocialMediaDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMedia.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentSocialMediaSerializer


class EducationContentSocialMediaLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaLanguage.objects.all().order_by("id")
    serializer_class = EducationContentSocialMediaLanguageSerializer


class EducationContentSocialMediaLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaLanguage.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentSocialMediaLanguageSerializer


class EducationContentSocialMediaImageTextListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaImageText.objects.all().order_by("id")
    serializer_class = EducationContentSocialMediaImageTextSerializer


class EducationContentSocialMediaImageTextDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaImageText.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentSocialMediaImageTextSerializer


class EducationContentSocialMediaImageTextLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaImageTextLanguage.objects.all().order_by("id")
    serializer_class = EducationContentSocialMediaImageTextLanguageSerializer


class EducationContentSocialMediaImageTextLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaImageTextLanguage.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentSocialMediaImageTextLanguageSerializer


class EducationContentSocialMediaHashtagsListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaHashtags.objects.all().order_by("id")
    serializer_class = EducationContentSocialMediaHashtagsSerializer


class EducationContentSocialMediaHashtagsDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaHashtags.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentSocialMediaHashtagsSerializer


class EducationContentSocialMediaHashtagsLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaHashtagsLanguage.objects.all().order_by("id")
    serializer_class = EducationContentSocialMediaHashtagsLanguageSerializer


class EducationContentSocialMediaHashtagsLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentSocialMediaHashtagsLanguage.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentSocialMediaHashtagsLanguageSerializer


class EducationContentAppContentListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContent.objects.all().order_by("id")
    serializer_class = EducationContentAppContentSerializer


class EducationContentAppContentDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContent.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentAppContentSerializer


class EducationContentAppContentLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContentLanguage.objects.all().order_by("id")
    serializer_class = EducationContentAppContentLanguageSerializer


class EducationContentAppContentLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContentLanguage.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentAppContentLanguageSerializer


class EducationContentAppContentWhatYouShouldKnowListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContentWhatYouShouldKnow.objects.all().order_by("id")
    serializer_class = EducationContentAppContentWhatYouShouldKnowSerializer


class EducationContentAppContentWhatYouShouldKnowDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContentWhatYouShouldKnow.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentAppContentWhatYouShouldKnowSerializer


class EducationContentAppContentWhatYouShouldKnowLanguageListDashboardView(generics.ListCreateAPIView):
    pagination_class = StandardSetPagination
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContentWhatYouShouldKnowLanguage.objects.all().order_by("id")
    serializer_class = EducationContentAppContentWhatYouShouldKnowLanguageSerializer


class EducationContentAppContentWhatYouShouldKnowLanguageDetailDashboardView(generics.RetrieveUpdateDestroyAPIView):
    authentication_classes = [APIKeyAuthentication, DashboardTokenAuthentication]
    queryset = EducationContentAppContentWhatYouShouldKnowLanguage.objects.all()
    lookup_field = "id"
    serializer_class = EducationContentAppContentWhatYouShouldKnowLanguageSerializer
