import wagtail_factories

from vbv_lernwelt.learnpath.models import LearningPath, Topic, Circle, LearningSequence, LearningContent, LearningUnit, \
    LearningUnitQuestion
from vbv_lernwelt.learnpath.models_learning_unit_content import VideoBlock, WebBasedTrainingBlock, PodcastBlock, \
    CompetenceBlock, ExerciseBlock, DocumentBlock, KnowledgeBlock


class LearningPathFactory(wagtail_factories.PageFactory):
    title = "Versicherungsvermittler/in"

    class Meta:
        model = LearningPath


class TopicFactory(wagtail_factories.PageFactory):
    title = "Gewinnen von Kunden"
    is_visible = True

    class Meta:
        model = Topic


class CircleFactory(wagtail_factories.PageFactory):
    title = "Gewinnen"

    class Meta:
        model = Circle


class LearningSequenceFactory(wagtail_factories.PageFactory):
    title = "Grundlagen"

    class Meta:
        model = LearningSequence


class LearningUnitFactory(wagtail_factories.PageFactory):
    title = 'Lerneinheit'

    class Meta:
        model = LearningUnit


class LearningUnitQuestionFactory(wagtail_factories.PageFactory):
    title = 'Frage zu Lerneinheit'

    class Meta:
        model = LearningUnitQuestion


class LearningContentFactory(wagtail_factories.PageFactory):
    title = 'Lerninhalt'

    class Meta:
        model = LearningContent


class VideoBlockFactory(wagtail_factories.StructBlockFactory):
    url = "https://www.youtube.com/embed/qhPIfxS2hvI"
    description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"

    class Meta:
        model = VideoBlock


class WebBasedTrainingBlockFactory(wagtail_factories.StructBlockFactory):
    url = "/media/web_based_trainings/rise_cmi5_test_export/scormcontent/index.html"
    description = "Beispiel Rise Modul"

    class Meta:
        model = WebBasedTrainingBlock


class PodcastBlockFactory(wagtail_factories.StructBlockFactory):
    description = "Beispiel Podcast"
    url = "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/325190984&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"

    class Meta:
        model = PodcastBlock


class CompetenceBlockFactory(wagtail_factories.StructBlockFactory):
    description = "Beispiel Kompetenz"

    class Meta:
        model = CompetenceBlock


class ExerciseBlockFactory(wagtail_factories.StructBlockFactory):
    description = "Beispiel Aufgabe"

    class Meta:
        model = ExerciseBlock


class DocumentBlockFactory(wagtail_factories.StructBlockFactory):
    description = "Beispiel Dokument"

    class Meta:
        model = DocumentBlock


class KnowledgeBlockFactory(wagtail_factories.StructBlockFactory):
    description = "Beispiel Wissen"

    class Meta:
        model = KnowledgeBlock
