import{NativeFunctions}from"./NativeFunctions.js";let javaScriptMetadataInstance;export class JavaScriptMetadataImpl{static instance(t={forceNew:null}){const{forceNew:e}=t;return javaScriptMetadataInstance&&!e||(javaScriptMetadataInstance=new JavaScriptMetadataImpl),javaScriptMetadataInstance}constructor(){this._uniqueFunctions=new Map,this._instanceMethods=new Map,this._staticMethods=new Map;for(const t of NativeFunctions)if(t.receiver)if(t.static){let e=this._staticMethods.get(t.receiver);e||(e=new Map,this._staticMethods.set(t.receiver,e)),e.set(t.name,t.signatures)}else{let e=this._instanceMethods.get(t.receiver);e||(e=new Map,this._instanceMethods.set(t.receiver,e)),e.set(t.name,t.signatures)}else this._uniqueFunctions.set(t.name,t.signatures)}signaturesForNativeFunction(t){return this._uniqueFunctions.get(t)||null}signaturesForInstanceMethod(t,e){const s=this._instanceMethods.get(e);return s&&s.get(t)||null}signaturesForStaticMethod(t,e){const s=this._staticMethods.get(e);return s&&s.get(t)||null}}