# Path: atomicpress/app.py
# DEFAULT_EXTENSIONS = (
#     "atomicpress.ext.importer",
#     "atomicpress.ext.exporter",
#     "atomicpress.ext.ftp",
#     "atomicpress.ext.s3",
#     "atomicpress.ext.prefill",
# )
# DEFAULT_MARKDOWN_EXTENSIONS = [
#     "markdown.extensions.tables",
#     "markdown.extensions.nl2br",
#     "markdown.extensions.fenced_code",
#     "markdown.extensions.headerid"
# ]
# def setup(init_run=False):
# def activate_extensions():
# def activate_theme(theme):
# def run():


from atomicpress.app import app
from flask import request, url_for


def is_url_showing(route=None, **kwargs):
    url = url_for(route, **kwargs).strip("/")
    freeze_url = app.config["FREEZER_BASE_URL"].strip("/")+request.path
    urls = (freeze_url.strip("/"),
            request.path.strip("/"),)

    if url in urls:
        return "active"
    return ""



# Path: atomicpress/app.py
# DEFAULT_EXTENSIONS = (
#     "atomicpress.ext.importer",
#     "atomicpress.ext.exporter",
#     "atomicpress.ext.ftp",
#     "atomicpress.ext.s3",
#     "atomicpress.ext.prefill",
# )
# DEFAULT_MARKDOWN_EXTENSIONS = [
#     "markdown.extensions.tables",
#     "markdown.extensions.nl2br",
#     "markdown.extensions.fenced_code",
#     "markdown.extensions.headerid"
# ]
# def setup(init_run=False):
# def activate_extensions():
# def activate_theme(theme):
# def run():


# Path: atomicpress/context_processors.py
from atomicpress.app import app
from flask import request, url_for



def is_url_showing(route=None, **kwargs):
    url = url_for(route, **kwargs).strip("/")
    freeze_url = app.config["FREEZER_BASE_URL"].strip("/")+request.path
    urls = (freeze_url.strip("/"),
            request.path.strip("/"),)

    if url in urls:
        return "active"
    return ""



app.jinja_env.globals.update(is_url_showing=is_url_showing)