# -*- coding: utf-8 -*-
from appconf import AppConf
from django.conf import settings  # NOQA
from django.utils.translation import gettext_lazy as _


class CmspluginFilerFolderAppConf(AppConf):
    STYLE_CHOICES = (("list", _("List")), ("slideshow", _("Slideshow")))
    DEFAULT_STYLE = "list"

    def configure(self):
        # set DEFAULT_STYLE to '' if it is not in STYLE_CHOICES
        if not self.configured_data["DEFAULT_STYLE"] in [
            s for s, l in self.configured_data["STYLE_CHOICES"]
        ]:
            self.configured_data["DEFAULT_STYLE"] = ""
        return self.configured_data
