from _typeshed import Incomplete
from arelle import PackageManager as PackageManager, UrlUtil as UrlUtil, ValidateFilingText as ValidateFilingText, XbrlConst as XbrlConst, XhtmlValidate as XhtmlValidate, XmlUtil as XmlUtil, XmlValidateSchema as XmlValidateSchema
from arelle.ModelDtsObject import ModelLink as ModelLink
from arelle.ModelInstanceObject import ModelFact as ModelFact
from arelle.ModelObject import ModelObject as ModelObject
from arelle.ModelObjectFactory import parser as parser
from arelle.ModelValue import qname as qname
from arelle.PluginManager import pluginClassMethods as pluginClassMethods
from arelle.PrototypeDtsObject import ArcPrototype as ArcPrototype, DocumentPrototype as DocumentPrototype, LinkPrototype as LinkPrototype, LocPrototype as LocPrototype, PrototypeElementTree as PrototypeElementTree
from arelle.PythonUtil import OrderedDefaultDict as OrderedDefaultDict, normalizeSpace as normalizeSpace
from arelle.XhtmlValidate import ixMsgCode as ixMsgCode
from arelle.XmlValidate import VALID as VALID, lxmlSchemaValidate as lxmlSchemaValidate
from typing import Any

creationSoftwareNames: Incomplete

def load(modelXbrl, uri, base: Incomplete | None = ..., referringElement: Incomplete | None = ..., isEntry: bool = ..., isDiscovered: bool = ..., isIncluded: Incomplete | None = ..., isSupplemental: bool = ..., namespace: Incomplete | None = ..., reloadCache: bool = ..., **kwargs) -> Union[ModelDocument, None]: ...
def loadSchemalocatedSchema(modelXbrl, element, relativeUrl, namespace, baseUrl): ...
def create(modelXbrl, type, uri, schemaRefs: Incomplete | None = ..., isEntry: bool = ..., initialXml: Incomplete | None = ..., initialComment: Incomplete | None = ..., base: Incomplete | None = ..., discover: bool = ..., documentEncoding: str = ...): ...

class Type:
    UnknownXML: int
    UnknownNonXML: int
    UnknownTypes: int
    firstXBRLtype: int
    SCHEMA: int
    LINKBASE: int
    INSTANCE: int
    INLINEXBRL: int
    lastXBRLtype: int
    DTSENTRIES: int
    INLINEXBRLDOCUMENTSET: int
    VERSIONINGREPORT: int
    TESTCASESINDEX: int
    TESTCASE: int
    REGISTRY: int
    REGISTRYTESTCASE: int
    XPATHTESTSUITE: int
    RSSFEED: int
    ARCSINFOSET: int
    FACTDIMSINFOSET: int
    HTML: int
    TESTCASETYPES: Incomplete
    typeName: Incomplete
    def identify(filesource, filepath) -> int: ...

schemaBottom: Incomplete
fractionParts: Incomplete

class ModelDocument:
    documentEncoding: str
    xmlRootElement: Any
    modelXbrl: Incomplete
    skipDTS: Incomplete
    type: Incomplete
    uri: Incomplete
    filepath: Incomplete
    xmlDocument: Incomplete
    targetNamespace: Incomplete
    objectIndex: Incomplete
    referencesDocument: Incomplete
    idObjects: Incomplete
    hrefObjects: Incomplete
    schemaLocationElements: Incomplete
    referencedNamespaces: Incomplete
    inDTS: bool
    definesUTR: bool
    isModified: bool
    def __init__(self, modelXbrl, type, uri, filepath, xmlDocument) -> None: ...
    def objectId(self, refId: str = ...): ...
    @property
    def qname(self): ...
    def relativeUri(self, uri): ...
    @property
    def modelDocument(self): ...
    @property
    def displayUri(self): ...
    @property
    def basename(self): ...
    @property
    def filepathdir(self): ...
    @property
    def propertyView(self): ...
    def setTitle(self, cntlr) -> None: ...
    def setTitleInBackground(self) -> None: ...
    def updateFileHistoryIfNeeded(self) -> None: ...
    def save(self, overrideFilepath: Incomplete | None = ..., outputZip: Incomplete | None = ..., outputFile: Incomplete | None = ..., updateFileHistory: bool = ..., encoding: str = ..., **kwargs) -> None: ...
    def close(self, visited: Incomplete | None = ..., urlDocs: Incomplete | None = ...) -> None: ...
    def gettype(self): ...
    @property
    def creationSoftwareComment(self): ...
    @property
    def creationSoftware(self): ...
    @property
    def processingInstructions(self): ...
    noTargetNamespace: bool
    isQualifiedElementFormDefault: Incomplete
    isQualifiedAttributeFormDefault: Incomplete
    def schemaDiscover(self, rootElement, isIncluded, isSupplemental, namespace) -> None: ...
    def schemaDiscoverChildElements(self, parentModelObject, isSupplemental: bool = ...) -> None: ...
    def baseForElement(self, element): ...
    def importDiscover(self, element) -> None: ...
    def schemalocateElementNamespace(self, element) -> None: ...
    def loadSchemalocatedSchemas(self) -> None: ...
    def schemaLinkbaseRefsDiscover(self, tree) -> None: ...
    def schemaLinkbaseRefDiscover(self, element): ...
    def linkbasesDiscover(self, tree) -> None: ...
    def linkbaseDiscover(self, linkbaseElement, inInstance: bool = ...) -> None: ...
    def discoverHref(self, element, nonDTS: bool = ..., urlRewritePluginClass: Incomplete | None = ...): ...
    def instanceDiscover(self, xbrlElement) -> None: ...
    def instanceContentsDiscover(self, xbrlElement) -> None: ...
    def contextDiscover(self, modelContext) -> None: ...
    def unitDiscover(self, unitElement) -> None: ...
    ixNS: Incomplete
    ixNStag: Incomplete
    htmlBase: Incomplete
    def inlineXbrlDiscover(self, htmlElement) -> None: ...
    def factDiscover(self, modelFact, parentModelFacts: Incomplete | None = ..., parentElement: Incomplete | None = ...) -> None: ...
    def testcasesIndexDiscover(self, rootNode) -> None: ...
    outpath: Incomplete
    testcaseVariations: Incomplete
    def testcaseDiscover(self, testcaseElement) -> None: ...
    def registryDiscover(self, rootNode) -> None: ...
    def xPathTestSuiteDiscover(self, rootNode) -> None: ...
    def addDocumentReference(self, doc, referenceType, referringModelObject: Incomplete | None = ...) -> None: ...

def inlineIxdsDiscover(modelXbrl, modelIxdsDocument): ...

class LoadingException(Exception): ...

class ModelDocumentReference:
    referenceTypes: Incomplete
    referringModelObject: Incomplete
    def __init__(self, referenceType, referringModelObject: Incomplete | None = ...) -> None: ...
    @property
    def referringXlinkRole(self): ...
