# Configguration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'NV'
copyright = '2026 NACVIEW. All rights reserved.'
author = 'NV Team'
release = '3'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
	'myst_parser',
    'sphinxcontrib.redoc',
	'sphinx_immaterial',
    'sphinxcontrib.images',
    'notfound.extension'
]

source_suffix = {
    '.rst': 'restructuredtext',
    '.txt': 'markdown',
    '.md': 'markdown',
}

redoc = [
    {
        'name': 'NV3 API',
        'page': 'api/index',
        'spec': '_files/openapi.yaml',
        'embed': False,
        'opts': {
            'lazy-rendering': True,
            'suppress-warnings': False,
#            'required-props-first': False,
#            'expand-responses': ["200", "201"],
#            'native-scrollbars': True,
        }
    }
]
redoc_uri = 'https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js'

templates_path = ['_templates']
#exclude_patterns = ['tutorials/*.md','tutorials/*.rst']
exclude_patterns = ['getting-started/deployment-guide/next-steps.rst','configuration-guides/integrations/*.md','configuration-guides/integrations/*.rst','tutorials/*.md','configuration-guides/captive-portal/*']
master_doc = "index"
#notfound_template = "404.rst"
notfound_urls_prefix = None
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_last_updated_fmt = ""
html_static_path = ['_static']
html_css_files = ["custom.css"]
html_title = "NV3 Documentation"
html_logo = "_static/logo_NV3_circle.svg"
html_favicon = "_static/favicon.ico"
html_theme = "sphinx_immaterial"
html_permalinks_icon = "🔗"
html_theme_options = {
    #'languages': [
        #{
        #    "name": "English",
        #    "link": "en/",
        #    "lang": "en",
        #},
#        {
#            "name": "Polish",
#            "link": "pl/",
#            "lang": "pl",
#        },
    #],
   'globaltoc_collapse': False,
    "toc_title_is_page_title": True,
    "features": [
        #"toc.integrate"
        #"navigation.expand",
        "navigation.sections",
        "navigation.instant",
        "header.autohide",
        "navigation.top",
        "navigation.tracking",
        "search.highlight",
        "search.share",
        "search.suggest",
        "toc.follow",
        #"toc.sticky",
        "content.tabs.link",
        "content.code.copy",
        "content.tooltips",
        "announce.dismiss",
    ],
    "palette": [
        {
            "media": "(prefers-color-scheme)",
            "toggle": {
                "icon": "material/weather-sunny",
                "name": "Switch to light mode",
            },
        },
        {
            "media": "(prefers-color-scheme: light)",
            "scheme": "default",
            "primary": "blue",
            "accent": "dark-green",
            "toggle": {
                "icon": "material/weather-night",
                "name": "Switch to dark mode",
            },
        },
        {
            "media": "(prefers-color-scheme: dark)",
            "scheme": "slate",
            "primary": "blue",
            "accent": "dark-orange",
            "toggle": {
                "icon": "material/monitor",
                "name": "Switch to system preference",
            },
        },
    ],
    "font": {
        "text": "IBM Plex Sans",
        "code": "IBM Plex Mono"
    },
    "social": [
        {
            "icon": "fontawesome/brands/square-facebook",
            "link": "https://www.facebook.com/Nacview-1451156908238192/"
        },
        {
            "icon": "fontawesome/brands/square-x-twitter",
            "link": "https://twitter.com/NACVIEW1?lang=pl"
        },
        {
            "icon": "fontawesome/brands/linkedin",
            "link": "https://www.linkedin.com/company/28985644/"
        }
    ],
    "status": {
        'new': {
            "title": 'Recently added',
            "icon": 'material/alert-decagram'
        },
        'wip': {
            "title": 'Work in progress',
            "icon": 'circle-exclamation-solid-full'
        },
        'deprecated': {
            "title": 'Deprecated',
            "icon": 'material/trash-can'
        },
    },
}
sphinx_immaterial_icon_path = html_static_path
myst_enable_extensions = [
    "deflist",
    "fieldlist",
    "smartquotes",
    "replacements",
    "strikethrough",
    "substitution",
    "tasklist",
    "attrs_inline",
    "attrs_block",
]
