################################################################
#                                                              #
#  This file is part of HermesBaby                             #
#                       the software engineer's typewriter     #
#                                                              #
#      https://github.com/hermesbaby                           #
#                                                              #
#  Copyright (c) 2024 Alexander Mann-Wahrenberg (basejumpa)    #
#                                                              #
#  License(s)                                                  #
#                                                              #
#  - MIT for contents used as software                         #
#  - CC BY-SA-4.0 for contents used as method or otherwise     #
#                                                              #
################################################################

menu "Document"

config DOC__TITLE
    string "Title"
    default "The Default Title"


config DOC__AUTHOR
    string "Author"
    default "The Default Author"


config DOC__YEAR
    int "Year"
    default 0


config DOC__PROJECT
    string "Project"
    default "The Default Project"


config DOC__LANGUAGE
    string
    default "en" if DOC_LANGUAGE_ENGLISH
    default "de" if DOC_LANGUAGE_GERMAN

    choice
        prompt "Language"
        default DOC_LANGUAGE_ENGLISH

    config DOC_LANGUAGE_ENGLISH
        bool "English"

    config DOC_LANGUAGE_GERMAN
        bool "German"

    endchoice


config DOC__CONFIDENTIALITY_LEVEL_LABEL
    string
    default "Confidentiality level" if DOC_LANGUAGE_ENGLISH
    default "Vertraulichkeitsstufe" if DOC_LANGUAGE_GERMAN

config DOC__CONFIDENTIALITY_LEVEL
    string
    default "Public"                if DOC_LANGUAGE_ENGLISH && DOC__CONFIDENTIALITY_PUBLIC
    default "Internal"              if DOC_LANGUAGE_ENGLISH && DOC__CONFIDENTIALITY_INTERNAL
    default "Confidential"          if DOC_LANGUAGE_ENGLISH && DOC__CONFIDENTIALITY_CONFIDENTIAL
    default "Strictly confidential" if DOC_LANGUAGE_ENGLISH && DOC__CONFIDENTIALITY_STRICTLY_CONFIDENTIAL
    default "Öffentlich"            if DOC_LANGUAGE_GERMAN  && DOC__CONFIDENTIALITY_PUBLIC
    default "Intern"                if DOC_LANGUAGE_GERMAN  && DOC__CONFIDENTIALITY_INTERNAL
    default "Vertraulich"           if DOC_LANGUAGE_GERMAN  && DOC__CONFIDENTIALITY_CONFIDENTIAL
    default "Streng vertraulich"    if DOC_LANGUAGE_GERMAN  && DOC__CONFIDENTIALITY_STRICTLY_CONFIDENTIAL

    choice
        prompt "Confidentiality Level"
        default DOC__CONFIDENTIALITY_PUBLIC

    config DOC__CONFIDENTIALITY_PUBLIC
        bool "Public"
        help
            The document is public.

    config DOC__CONFIDENTIALITY_INTERNAL
        bool "Internal"
        help
            The document is internal.

    config DOC__CONFIDENTIALITY_CONFIDENTIAL
        bool "Confidential"
        help
            The document is confidential.

    config DOC__CONFIDENTIALITY_STRICTLY_CONFIDENTIAL
        bool "Strictly confidential"
        help
            The document is strictly confidential.

    endchoice


endmenu



menu "i18n"

config I18N__DIR_LOCALES
    string "Locales Directory (relative to Source Directory)"
    default "_locales"
    help
        Where .po/.mo translation catalogs live, relative to the Source
        Directory. Underscore-prefixed by default (matching _figures,
        _attachments, _listings, _unused) so it reads as infrastructure
        rather than a content chapter when it sits alongside other
        documents.

config I18N__LANGUAGES
    string "Languages to maintain translation catalogs for (comma-separated)"
    default ""
    help
        Comma-separated language codes that `hb i18n update-po` / `hb i18n stats`
        maintain .po catalogs for under <source>/<I18N__DIR_LOCALES>/<lang>/LC_MESSAGES/.
        Override per-invocation with --language/-l (repeatable). Empty by
        default so a project opts into i18n explicitly (e.g. "en,de").

endmenu



menu "CM"

config CM__TICKET_KEY
    string "Ticket Key"
    default "PRJ"

endmenu



menu "SCM"

config SCM__HOST
    string "Host (with port if necessary)"
    default "host.some.com:4711"


config SCM__OWNER_KIND
    string
    default "projects" if SCM__PROJECT
    default "users"    if SCM__USER

    choice
        prompt "Kind of owner"
        default SCM__PROJECT

    config SCM__PROJECT
        bool "project"

    config SCM__USER
        bool "user"

    endchoice


config SCM__OWNER
    string "Owner"
    default "SomeOwner"


config SCM__REPO
    string "Repository"
    default "SomeRepository"


config SCM__REPO__URL_GIT_CLIENT
    string "URL to repository for git client"
    default "https://github.com/hermesbaby/some-doc.git"

endmenu



menu "Build"

config BUILD__DIRS__SOURCE
    string "Source Directory"
    default "docs"

config BUILD__DIRS__CONFIG
    string "Config Directory"
    default "docs"

config BUILD__DIR_PARTLY
    string "Partly Directory"
    default ""
    help
        If non-empty, then Partly Build is activated.

        Same as option --partly <rel-path>
            where <rel-path> is the relative path to a directory where .hermesbaby resides.
        The --partly command-line option also accepts a Markdown or reStructuredText file path,
            which is used as the entry point for the partial build.
        This enables partly a build of only a sub-section of the documentation.
        Use value same as Source Directory to build the entire document but make the build
            tolerating Unresolved References ({ref}, {term}) and perceive them as Outgoing References
        In case such exist, a chapter "Outgoing References" is added to the end of the document
            listing all Unresolved References including backlinks to where they were referenced.

config BUILD__DIRS__BUILD
    string "Build Directory"
    default "out/docs"
config BUILD__PORTS__HTML__LIVE
    int "Port for live preview of HTML build"
    default 0
    help
        The port number for live preview of the HTML build.
        Set to 0 to auto-detect a free port.

config BUILD__PORTS__PDF__LIVE
    int "Port for live preview of pdf build"
    default 0
    help
        The port number for live preview of the PDF build.
        Set to 0 to auto-detect a free port.

endmenu


menu "Link Patterns"

config LINK_PATTERNS__JIRA
    string "Link Pattern for :jira:"
    default "https://github.com/hermesbaby/hermesbaby/issues/%s"

config LINK_PATTERNS__ISSUE
    string "Link Pattern for :issue:"
    default "https://github.com/hermesbaby/hermesbaby/issues/%s"

config LINK_PATTERNS__REPO
    string "Link Pattern for :repo:"
    default "https://github.com/%s.git"

config LINK_PATTERNS__JOB
    string "Link Pattern for :job:"
    default "https://github.com/%s/actions/"

config LINK_PATTERNS__USER
    string "Link Pattern for :user:"
    default "https://github.com/%s"

endmenu


menu "Styling"

config STYLING__COLOR_PRIMARY
    string "Primary Color"
    default ""
    help
        The primary color of the document.
        Leave empty for default color.
        Options are red, pink, purple, deep-purple, indigo, blue,
        light-blue, cyan, teal, green, light-green, lime, yellow, amber,
        orange, deep-orange, brown, grey, blue-grey, and white.

config STYLING__COLOR_ACCENT
    string "Accent Color"
    default ""
    help
        The accent color of the document.
        Leave empty for default color.
        Options are red, pink, purple, deep-purple, indigo, blue,
        light-blue, cyan, teal, green, light-green, lime, yellow, amber,
        orange, deep-orange, brown, grey, blue-grey, and white.

config STYLING__GLOBALTOC_DEPTH
    int "Global Table of Contents Depth"
    default 3
    help
        The depth of the global table of contents in the sidebar.
        This controls how many levels of the document structure are shown.
        Default is 3.

endmenu



menu "Publish"

config PUBLISH__CREATE_AND_EMBED_PDF
    bool "Build PDF and embed it to the html based site"
    default n
    help
        Whether to add the generated PDF to the publish process.

config PUBLISH__TARBALL
    bool "Publish tarball"
    default n
    help
        Create an tarball html.tar.gz and place it in the root of the published site

config PUBLISH__HOST
    string "Host (with port if necessary)"
    default "docs.some-host.com"

config PUBLISH__USER
    string "User with access to publish"
    default ""

config PUBLISH__REPO
    string "Repository on publish host"
    default ""
    help
        The repository <repo> to publish to in pattern https://<PUBLISH__HOST>/projects|users/<owner>/<repo>/<branch>
        If not set / empty, then <repo> is derived from <SCM__REPO>

config PUBLISH__SSH_PATH
    string "Relative Path of directory .ssh/"
    default ".ci/.ssh"

config PUBLISH__CROSS_REFERENCES__USER
    string "Inter Crossreference User"
    default "intersphinx"
    help
        User which has access to cross reference index files of intersphinx `object.inv`

config PUBLISH__CROSS_REFERENCES__PASSWORD
    string "Inter Crossreference Password"
    default "xnihpsretni"
    help
        Password of the user which has access to cross reference index files of intersphinx `object.inv`

endmenu
