/// @file constants.h
/// @brief a collection of relevant constant values such as namespace urns
///
/// @author Luke Ian Turner
/// @date 2026-06-24
/// @copyright Copyright (c) 2026 Luke Ian Turner
/// @copyright
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
/// @copyright
/// The above copyright notice and this permission notice shall be included in all
/// copies or substantial portions of the Software.
/// @copyright
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
/// SOFTWARE.

#pragma once

#include <string_view>

/// @brief Constant values relevant to the ADatP standards.
///
/// Contains URNs, namespaces, keys and generally anything which may be considered
/// a relevant fixed value which could affect interoperability.
namespace nmbs::constants
{
    /// @brief XML namespace defined by ADatP‑4774 Ed. A, Ver. 1.
    ///
    /// This constant identifies the official URN for the Confidentiality Metadata
    /// Label schema as specified in ADatP‑4774. It is used when generating
    /// standards‑compliant confidentiality labels and related metadata structures.
    /// @see nmbs::s4774_prefix
    inline constexpr std::string_view s4774_namespace = "urn:nato:stanag:4774:confidentialitymetadatalabel:1:0";

    /// @brief Preferred XML prefix for the ADatP‑4774 namespace.
    ///
    /// This prefix is the normative identifier defined in ADatP‑5636 Ed. A, Ver. 1
    /// for the ADatP‑4774 Confidentiality Metadata Label schema. Earlier materials,
    /// including examples and XSD fragments in ADatP‑4774 Ed. A, Ver. 1, used the
    /// alias "slab"; however, this is not the authoritative definition. Future
    /// revisions of ADatP‑4774 are expected to align with the ADatP‑5636 prefix.
    ///
    /// Although XML processors should rely on namespace URIs rather than prefixes
    /// for identification, many software systems still treat prefixes as
    /// significant. Using the standardized prefix improves interoperability with
    /// tools that do not fully respect namespace semantics.
    /// @see nmbs::s4774_namespace
    inline constexpr std::string_view s4774_prefix = "s4774";

    /// @brief XML namespace defined by ADatP‑4778 Ed. A, Ver. 1.
    ///
    /// This constant identifies the official URN for the Binding Information schema
    /// specified in ADatP‑4778. It is used when generating standards‑compliant
    /// binding information elements that accompany confidentiality labels and other
    /// metadata structures defined across the ADatP‑4774/4778/5636 family.
    /// @see nmbs::s4778_prefix
    inline constexpr std::string_view s4778_namespace = "urn:nato:stanag:4778:bindinginformation:1:0";

    /// @brief Preferred XML prefix for the ADatP‑4778 namespace.
    ///
    /// This prefix is the normative identifier associated with the Binding
    /// Information schema defined in ADatP‑4778 Ed. A, Ver. 1. While XML processors
    /// should rely on namespace URIs rather than prefixes for schema identification,
    /// many software systems still treat prefixes as significant. Using the
    /// standardized prefix improves interoperability with tools that do not fully
    /// respect namespace semantics.
    /// @see nmbs::s4778_namespace
    inline constexpr std::string_view s4778_prefix = "s4778";

    /// @brief XMP namespace defined for ADatP‑4778 binding information.
    ///
    /// This constant identifies the URN used by the XMP representation of the
    /// ADatP‑4778 Binding Information schema, as specified in ADatP‑4778.2 Ed. A,
    /// Ver. 1. Although this namespace does not appear in any XML generated by this
    /// library, it is required when interacting with XMP metadata—particularly when
    /// locating or interpreting existing binding‑information tags embedded in image
    /// files or other media.
    ///
    /// @see nmbs::s4778_xmp_prefix
    inline constexpr std::string_view s4778_xmp_namespace = "urn:nato:stanag:4778:bindinginformation:1:0:xmp#";

    /// @brief Preferred XML prefix for the ADatP‑4778 XMP namespace.
    ///
    /// This prefix appears in example material associated with ADatP‑4778.2 Ed. A,
    /// Ver. 1, but it is not normatively defined in either ADatP‑4778 or
    /// ADatP‑5636. It is provided here solely for human readability and for
    /// constructing conventional XMP property names of the form:
    ///
    ///     Xmp.[nmbs::s4778_xmp_prefix].[nmbs::s4778_key]
    ///
    /// Software must not rely on this prefix for identification. When reading XMP
    /// metadata, programs must instead use the namespace URI
    /// (`nmbs::s4778_xmp_namespace`) to determine which prefix or prefixes are in
    /// use, as multiple aliases may legitimately appear in existing files.
    /// @see nmbs::s4778_xmp_namespace
    inline constexpr std::string_view s4778_xmp_prefix = "mbxmp";

    /// @brief Local name used for the ADatP‑4778 XMP property.
    ///
    /// This constant defines the key component of the XMP property associated with
    /// ADatP‑4778 binding information. The resulting XMP property name follows the
    /// conventional structure:
    ///
    ///     Xmp.[nmbs::s4778_xmp_prefix].[nmbs::s4778_key]
    ///
    /// The value of `s4778_xmp_prefix` is provided only for human readability and
    /// for constructing familiar XMP property strings. Software must not rely on
    /// this prefix for identification. When reading XMP metadata, programs must use
    /// the namespace URI (`nmbs::s4778_xmp_namespace`) to determine which prefix or
    /// prefixes are actually in use, as multiple aliases may legitimately appear in
    /// existing files.
    inline constexpr std::string_view s4778_key = "bindingInformation";

    inline constexpr std::string_view spif_namespace = "http://www.xmlspif.org/spif";

    inline constexpr std::string_view spif_prefix = "spif";
}
