""" Core linked records app settings
"""
from django.conf import settings

if not settings.configured:
    settings.configure()

SERVER_URI = getattr(settings, "SERVER_URI", "http://localhost")

PID_XPATH = getattr(settings, "PID_XPATH", "Resource.@localid")

PID_FORMAT = getattr(settings, "PID_FORMAT", r"[a-zA-Z0-9_\-]+")

ID_PROVIDER_SYSTEMS = getattr(settings, "ID_PROVIDER_SYSTEMS", {
    "local": {
        "class":
            "core_linked_records_app.utils.providers.local.LocalIdProvider",
        "args": [
            SERVER_URI
        ]
    }
})

ID_PROVIDER_PREFIXES = getattr(settings, "ID_PROVIDER_PREFIXES", ["cdcs"])

ID_PROVIDER_PREFIX_DEFAULT = getattr(settings, "ID_PROVIDER_PREFIX_DEFAULT",
                                     ID_PROVIDER_PREFIXES[0])
