# Generated by Django 4.1.5 on 2023-01-27 16:50

from django.db import migrations, models
import django.db.models.deletion
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("wagtailcore", "0078_referenceindex"),
    ]

    operations = [
        migrations.CreateModel(
            name="ContentPage",
            fields=[
                (
                    "page_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="wagtailcore.page",
                    ),
                ),
                (
                    "body",
                    wagtail.fields.StreamField(
                        [
                            (
                                "title",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre"),
                                        ),
                                        (
                                            "large",
                                            wagtail.blocks.BooleanBlock(label="Large", required=False),
                                        ),
                                    ],
                                    label="Titre de page",
                                ),
                            ),
                            (
                                "paragraph",
                                wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"),
                            ),
                            (
                                "paragraphlarge",
                                wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)"),
                            ),
                            (
                                "image",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre", required=False),
                                        ),
                                        (
                                            "image",
                                            wagtail.images.blocks.ImageChooserBlock(label="Illustration"),
                                        ),
                                        (
                                            "alt",
                                            wagtail.blocks.CharBlock(
                                                label="Texte alternatif (description textuelle de l'image)",
                                                required=False,
                                            ),
                                        ),
                                        (
                                            "caption",
                                            wagtail.blocks.CharBlock(label="Légende", required=False),
                                        ),
                                        (
                                            "url",
                                            wagtail.blocks.URLBlock(label="Lien", required=False),
                                        ),
                                    ]
                                ),
                            ),
                            (
                                "imageandtext",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "image",
                                            wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)"),
                                        ),
                                        (
                                            "image_ratio",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("3", "3/12"),
                                                    ("5", "5/12"),
                                                    ("6", "6/12"),
                                                ],
                                                label="Largeur de l'image",
                                            ),
                                        ),
                                        (
                                            "text",
                                            wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)"),
                                        ),
                                        (
                                            "link_label",
                                            wagtail.blocks.CharBlock(
                                                help_text="Le lien apparait en bas du bloc de droite, avec une flèche",
                                                label="Titre du lien",
                                                required=False,
                                            ),
                                        ),
                                        (
                                            "link_url",
                                            wagtail.blocks.URLBlock(label="Lien", required=False),
                                        ),
                                    ],
                                    label="Bloc image à gauche et texte à droite",
                                ),
                            ),
                            (
                                "alert",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre du message", required=False),
                                        ),
                                        (
                                            "description",
                                            wagtail.blocks.TextBlock(label="Texte du message", required=False),
                                        ),
                                        (
                                            "level",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("error", "Erreur"),
                                                    ("success", "Succès"),
                                                    ("info", "Information"),
                                                    ("warning", "Attention"),
                                                ],
                                                label="Type de message",
                                            ),
                                        ),
                                    ],
                                    label="Message d'alerte",
                                ),
                            ),
                            (
                                "callout",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(
                                                label="Titre de la mise en vant",
                                                required=False,
                                            ),
                                        ),
                                        (
                                            "text",
                                            wagtail.blocks.TextBlock(
                                                label="Texte mis en avant",
                                                required=False,
                                            ),
                                        ),
                                    ],
                                    label="Texte mise en avant",
                                ),
                            ),
                            (
                                "quote",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "image",
                                            wagtail.images.blocks.ImageChooserBlock(
                                                label="Illustration (à gauche)",
                                                required=False,
                                            ),
                                        ),
                                        (
                                            "quote",
                                            wagtail.blocks.CharBlock(label="Citation"),
                                        ),
                                        (
                                            "author_name",
                                            wagtail.blocks.CharBlock(label="Nom de l'auteur"),
                                        ),
                                        (
                                            "author_title",
                                            wagtail.blocks.CharBlock(label="Titre de l'auteur"),
                                        ),
                                    ],
                                    label="Citation",
                                ),
                            ),
                            (
                                "video",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre", required=False),
                                        ),
                                        (
                                            "caption",
                                            wagtail.blocks.CharBlock(label="Légende"),
                                        ),
                                        (
                                            "url",
                                            wagtail.blocks.URLBlock(
                                                help_text=(
                                                    "URL au format 'embed' (Ex. : "
                                                    "https://www.youtube.com/embed/gLzXOViPX-0)"
                                                ),
                                                label="Lien de la vidéo",
                                            ),
                                        ),
                                    ],
                                    label="Vidéo",
                                ),
                            ),
                            (
                                "multicolumns",
                                wagtail.blocks.StreamBlock(
                                    [
                                        (
                                            "text",
                                            wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"),
                                        ),
                                        (
                                            "image",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    (
                                                        "title",
                                                        wagtail.blocks.CharBlock(
                                                            label="Titre",
                                                            required=False,
                                                        ),
                                                    ),
                                                    (
                                                        "image",
                                                        wagtail.images.blocks.ImageChooserBlock(label="Illustration"),
                                                    ),
                                                    (
                                                        "alt",
                                                        wagtail.blocks.CharBlock(
                                                            label=(
                                                                "Texte alternatif (description textuelle de l'image)"
                                                            ),
                                                            required=False,
                                                        ),
                                                    ),
                                                    (
                                                        "caption",
                                                        wagtail.blocks.CharBlock(
                                                            label="Légende",
                                                            required=False,
                                                        ),
                                                    ),
                                                    (
                                                        "url",
                                                        wagtail.blocks.URLBlock(label="Lien", required=False),
                                                    ),
                                                ],
                                                label="Image",
                                            ),
                                        ),
                                        (
                                            "video",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    (
                                                        "title",
                                                        wagtail.blocks.CharBlock(
                                                            label="Titre",
                                                            required=False,
                                                        ),
                                                    ),
                                                    (
                                                        "caption",
                                                        wagtail.blocks.CharBlock(label="Légende"),
                                                    ),
                                                    (
                                                        "url",
                                                        wagtail.blocks.URLBlock(
                                                            help_text=(
                                                                "URL au format 'embed' (Ex. : "
                                                                "https://www.youtube.com/embed/gLzXOViPX-0)"
                                                            ),
                                                            label="Lien de la vidéo",
                                                        ),
                                                    ),
                                                ],
                                                label="Vidéo",
                                            ),
                                        ),
                                        (
                                            "card",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    (
                                                        "title",
                                                        wagtail.blocks.CharBlock(label="Titre"),
                                                    ),
                                                    (
                                                        "description",
                                                        wagtail.blocks.TextBlock(label="Texte"),
                                                    ),
                                                    (
                                                        "image",
                                                        wagtail.images.blocks.ImageChooserBlock(label="Image"),
                                                    ),
                                                    (
                                                        "url",
                                                        wagtail.blocks.URLBlock(label="Lien", required=False),
                                                    ),
                                                    (
                                                        "document",
                                                        wagtail.documents.blocks.DocumentChooserBlock(
                                                            help_text=(
                                                                "Sélectionnez un document pour rendre la carte "
                                                                "cliquable vers celui ci (si le champ `Lien` "
                                                                "n'est pas renseigné)."
                                                            ),
                                                            label="ou Document",
                                                            required=False,
                                                        ),
                                                    ),
                                                ],
                                                label="Carte",
                                            ),
                                        ),
                                        (
                                            "quote",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    (
                                                        "image",
                                                        wagtail.images.blocks.ImageChooserBlock(
                                                            label="Illustration (à gauche)",
                                                            required=False,
                                                        ),
                                                    ),
                                                    (
                                                        "quote",
                                                        wagtail.blocks.CharBlock(label="Citation"),
                                                    ),
                                                    (
                                                        "author_name",
                                                        wagtail.blocks.CharBlock(label="Nom de l'auteur"),
                                                    ),
                                                    (
                                                        "author_title",
                                                        wagtail.blocks.CharBlock(label="Titre de l'auteur"),
                                                    ),
                                                ],
                                                label="Citation",
                                            ),
                                        ),
                                    ],
                                    label="Multi-colonnes",
                                ),
                            ),
                            (
                                "accordions",
                                wagtail.blocks.StreamBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre"),
                                        ),
                                        (
                                            "accordion",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    (
                                                        "title",
                                                        wagtail.blocks.CharBlock(label="Titre"),
                                                    ),
                                                    (
                                                        "content",
                                                        wagtail.blocks.RichTextBlock(label="Contenu"),
                                                    ),
                                                ],
                                                label="Accordéon",
                                                max_num=15,
                                                min_num=1,
                                            ),
                                        ),
                                    ],
                                    label="Accordéons",
                                ),
                            ),
                            (
                                "stepper",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre"),
                                        ),
                                        (
                                            "total",
                                            wagtail.blocks.IntegerBlock(label="Nombre d'étape"),
                                        ),
                                        (
                                            "current",
                                            wagtail.blocks.IntegerBlock(label="Étape en cours"),
                                        ),
                                        (
                                            "steps",
                                            wagtail.blocks.StreamBlock(
                                                [
                                                    (
                                                        "step",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(label="Titre de l'étape"),
                                                                ),
                                                                (
                                                                    "detail",
                                                                    wagtail.blocks.TextBlock(label="Détail"),
                                                                ),
                                                            ],
                                                            label="Étape",
                                                        ),
                                                    )
                                                ],
                                                label="Les étapes",
                                            ),
                                        ),
                                    ],
                                    label="Étapes",
                                ),
                            ),
                        ],
                        blank=True,
                        use_json_field=True,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("wagtailcore.page",),
        ),
    ]
