import pathlib
import re

from flask_babel import gettext as _
from kerko import extractors#, transformers
from kerko.renderers import TemplateRenderer
from kerko.specs import BadgeSpec, FieldSpec, SortSpec
from whoosh.fields import BOOLEAN, STORED

from .extractors import InCollectionBoostExtractor, MatchesTagExtractor
#from .transformers import extra_field_cleaner

# pylint: disable=invalid-name


class Config():

    def __init__(self):
        self.LIBSASS_INCLUDES = [
            str(pathlib.Path(__file__).parent.parent / 'static' / 'src' / 'vendor' / 'bootstrap' / 'scss'),
            str(pathlib.Path(__file__).parent.parent / 'static' / 'src' / 'vendor' / '@fortawesome' / 'fontawesome-free' / 'scss'),
        ]


class DevelopmentConfig(Config):

    def __init__(self):
        super().__init__()

        self.ASSETS_DEBUG = True  # Don't bundle/minify static assets.
        self.LIBSASS_STYLE = 'expanded'
        # self.EXPLAIN_TEMPLATE_LOADING = True


class ProductionConfig(Config):

    def __init__(self):
        super().__init__()

        self.ASSETS_DEBUG = False
        self.ASSETS_AUTO_BUILD = False
        self.LIBSASS_STYLE = 'compressed'


