import{Capability,SDKModel}from"./SDKModel.js";export class WebAuthnModel extends SDKModel{constructor(t){super(t),this._agent=t.webAuthnAgent()}setVirtualAuthEnvEnabled(t){return t?this._agent.invoke_enable():this._agent.invoke_disable()}async addAuthenticator(t){return(await this._agent.invoke_addVirtualAuthenticator({options:t})).authenticatorId}async removeAuthenticator(t){await this._agent.invoke_removeVirtualAuthenticator({authenticatorId:t})}async setAutomaticPresenceSimulation(t,e){await this._agent.invoke_setAutomaticPresenceSimulation({authenticatorId:t,enabled:e})}async getCredentials(t){return(await this._agent.invoke_getCredentials({authenticatorId:t})).credentials}async removeCredential(t,e){await this._agent.invoke_removeCredential({authenticatorId:t,credentialId:e})}}SDKModel.register(WebAuthnModel,Capability.WebAuthn,!1);