{"version":3,"sources":["../../../../src/lib/AreComponentResolver/AreComponentResolver.fragment.ts"],"names":[],"mappings":";;;;AAmCO,IAAe,oBAAA,GAAf,cAA4C,UAAA,CAAW;AAU9D;AAVsB,oBAAA,GAAf,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACqB,oBAAA,CAAA","file":"AreComponentResolver.fragment.mjs","sourcesContent":["import { A_Fragment, A_TYPES__Ctor } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\nimport { Are } from \"@adaas/are/component/Are.component\";\n\n\n/**\n * Pluggable hook the engine consults when a node's tag does NOT resolve to a\n * registered component.\n *\n * By default the loader treats an unresolved custom tag as a plain element. By\n * registering a concrete `AreComponentResolver` in the container, an app can\n * intercept that miss and supply the component class asynchronously — the\n * canonical mechanism for **runtime / lazy component loading** (fetch a class\n * from a backend, dynamic `import()`, etc.).\n *\n * The engine, on a resolution miss during load:\n *   1. calls {@link resolve} with the node's tag (the ASEID entity, e.g.\n *      `about-page`),\n *   2. if a class comes back, registers it into the node's scope (so the tag\n *      resolves from now on),\n *   3. proceeds to load the node as a component — no different from a\n *      bootstrap-registered one.\n *\n * Implementations are responsible for the transport (network, manifest lookup,\n * bundling) AND for memoizing already-loaded classes so repeated tags don't\n * refetch. Returning `undefined` means \"not a component\" and the node stays a\n * plain element.\n *\n * Resolution is OPT-IN: when no `AreComponentResolver` is registered the load\n * path is byte-for-byte unchanged.\n */\n@A_Frame.Define({\n    namespace: 'A-ARE',\n    description: 'Pluggable async resolver the engine consults when a node tag does not match a registered component, enabling runtime/lazy component loading. Implementations fetch the component class (network, dynamic import, manifest) and memoize it; the engine registers the returned class so the tag resolves thereafter.'\n})\nexport abstract class AreComponentResolver extends A_Fragment {\n\n    /**\n     * Resolve a tag to a component constructor, or `undefined` when the tag is\n     * not a (loadable) component.\n     *\n     * @param entity - the node's tag name (kebab-case ASEID entity, e.g.\n     *                 `about-page`).\n     */\n    abstract resolve(entity: string): Promise<A_TYPES__Ctor<Are> | undefined>;\n}\n"]}