# Generated by Django 3.2.7 on 2022-03-18 13:34

import django.db.models.deletion
import djangocms_attributes_field.fields
import djangocms_bootstrap5.fields
import djangocms_link.validators
import djangocms_text_ckeditor.fields
import filer.fields.file
import filer.fields.image
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
        ("filer", "0012_file_mime_type"),
        ("cms", "0022_auto_20180620_1551"),
        ("academic_community", "0003_auto_20220307_0948"),
    ]

    operations = [
        migrations.CreateModel(
            name="Bootstrap5CarouselCaptionSlide",
            fields=[
                (
                    "template",
                    models.CharField(
                        choices=[("default", "Default")],
                        default="default",
                        max_length=255,
                        verbose_name="Template",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        blank=True, max_length=255, verbose_name="Display name"
                    ),
                ),
                (
                    "external_link",
                    models.CharField(
                        blank=True,
                        help_text="Provide a link to an external source.",
                        max_length=2040,
                        validators=[
                            djangocms_link.validators.IntranetURLValidator(
                                intranet_host_re=None
                            )
                        ],
                        verbose_name="External link",
                    ),
                ),
                (
                    "anchor",
                    models.CharField(
                        blank=True,
                        help_text='Appends the value only after the internal or external link. Do <em>not</em> include a preceding "#" symbol.',
                        max_length=255,
                        verbose_name="Anchor",
                    ),
                ),
                (
                    "mailto",
                    models.EmailField(
                        blank=True,
                        max_length=255,
                        verbose_name="Email address",
                    ),
                ),
                (
                    "phone",
                    models.CharField(
                        blank=True, max_length=255, verbose_name="Phone"
                    ),
                ),
                (
                    "target",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("_blank", "Open in new window"),
                            ("_self", "Open in same window"),
                            ("_parent", "Delegate to parent"),
                            ("_top", "Delegate to top"),
                        ],
                        max_length=255,
                        verbose_name="Target",
                    ),
                ),
                (
                    "attributes",
                    djangocms_attributes_field.fields.AttributesField(
                        blank=True, default=dict, verbose_name="Attributes"
                    ),
                ),
                (
                    "cmsplugin_ptr",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        related_name="academic_community_bootstrap5carouselcaptionslide",
                        serialize=False,
                        to="cms.cmsplugin",
                    ),
                ),
                (
                    "carousel_content",
                    djangocms_text_ckeditor.fields.HTMLField(
                        blank=True,
                        default="",
                        help_text="Content may also be added using child plugins.",
                        verbose_name="Content",
                    ),
                ),
                (
                    "caption_attributes",
                    djangocms_bootstrap5.fields.AttributesField(
                        blank=True,
                        default=dict,
                        verbose_name="Caption attributes",
                    ),
                ),
                (
                    "tag_type",
                    djangocms_bootstrap5.fields.TagTypeField(
                        choices=[
                            ("div", "div"),
                            ("section", "section"),
                            ("article", "article"),
                            ("header", "header"),
                            ("footer", "footer"),
                            ("aside", "aside"),
                        ],
                        default="div",
                        help_text="Select the HTML tag to be used.",
                        max_length=255,
                        verbose_name="Tag type",
                    ),
                ),
                (
                    "carousel_image",
                    filer.fields.image.FilerImageField(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to=settings.FILER_IMAGE_MODEL,
                        verbose_name="Slide image",
                    ),
                ),
                (
                    "file_link",
                    filer.fields.file.FilerFileField(
                        blank=True,
                        help_text="If provided links a file from the filer app.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="filer.file",
                        verbose_name="File link",
                    ),
                ),
                (
                    "internal_link",
                    models.ForeignKey(
                        blank=True,
                        help_text="If provided, overrides the external link.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="cms.page",
                        verbose_name="Internal link",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("cms.cmsplugin",),
        ),
    ]
