import{Capability,SDKModel}from"./SDKModel.js";export class SecurityOriginManager extends SDKModel{constructor(i){super(i),this._mainSecurityOrigin="",this._unreachableMainSecurityOrigin="",this._securityOrigins=new Set}updateSecurityOrigins(i){const r=this._securityOrigins;this._securityOrigins=i;for(const e of r)this._securityOrigins.has(e)||this.dispatchEventToListeners(Events.SecurityOriginRemoved,e);for(const e of this._securityOrigins)r.has(e)||this.dispatchEventToListeners(Events.SecurityOriginAdded,e)}securityOrigins(){return[...this._securityOrigins]}mainSecurityOrigin(){return this._mainSecurityOrigin}unreachableMainSecurityOrigin(){return this._unreachableMainSecurityOrigin}setMainSecurityOrigin(i,r){this._mainSecurityOrigin=i,this._unreachableMainSecurityOrigin=r||null,this.dispatchEventToListeners(Events.MainSecurityOriginChanged,{mainSecurityOrigin:this._mainSecurityOrigin,unreachableMainSecurityOrigin:this._unreachableMainSecurityOrigin})}}export const Events={SecurityOriginAdded:Symbol("SecurityOriginAdded"),SecurityOriginRemoved:Symbol("SecurityOriginRemoved"),MainSecurityOriginChanged:Symbol("MainSecurityOriginChanged")};SDKModel.register(SecurityOriginManager,Capability.None,!1);