import wagtail_factories

from vbv_lernwelt.competence.models import (
    ActionCompetence,
    ActionCompetenceListPage,
    CompetenceCertificate,
    CompetenceCertificateList,
    CompetenceNaviPage,
    PerformanceCriteria,
)


class CompetenceNaviPageFactory(wagtail_factories.PageFactory):
    title = "KompetenzNavi"

    class Meta:
        model = CompetenceNaviPage


class CompetenceCertificateListFactory(wagtail_factories.PageFactory):
    title = "Kompetenznachweise"

    class Meta:
        model = CompetenceCertificateList


class CompetenceCertificateFactory(wagtail_factories.PageFactory):
    title = "Kompetenznachweis"

    class Meta:
        model = CompetenceCertificate


class ActionCompetenceListPageFactory(wagtail_factories.PageFactory):
    title = "Handlungskompetenzen"

    class Meta:
        model = ActionCompetenceListPage


class ActionCompetenceFactory(wagtail_factories.PageFactory):
    competence_id = "A1"
    title = "Weiterempfehlung für Neukunden generieren"

    class Meta:
        model = ActionCompetence


class PerformanceCriteriaFactory(wagtail_factories.PageFactory):
    competence_id = "A1.1"
    title = (
        "Bestehende Kunden so zu beraten, dass sie von diesen weiterempfohlen werden"
    )

    class Meta:
        model = PerformanceCriteria
