import{H as t,V as a,R as i,U as e,W as s,X as o,Y as r,Z as n}from"./ppyR687H.js";import"events";const u="variationGroupId and variationId are required";class l extends t{_variationGroupId;_variationId;_flagKey;_flagValue;_flagDefaultValue;_flagMetadata;_visitorContext;constructor(t){super({type:"ACTIVATE",userIp:t.userIp,screenResolution:t.screenResolution,locale:t.locale,sessionNumber:t.sessionNumber,visitorId:t.visitorId,anonymousId:t.anonymousId,qaMode:t.qaMode});const{variationGroupId:a,variationId:i,flagKey:e,flagValue:s,flagDefaultValue:o,flagMetadata:r,visitorContext:n}=t;this.variationGroupId=a,this.variationId=i,this.flagKey=e,this.flagValue=s,this.flagDefaultValue=o,this.flagMetadata=r,this.visitorContext=n}get variationGroupId(){return this._variationGroupId}set variationGroupId(t){this._variationGroupId=t}get variationId(){return this._variationId}set variationId(t){this._variationId=t}get flagKey(){return this._flagKey}set flagKey(t){this._flagKey=t}get flagValue(){return this._flagValue}set flagValue(t){this._flagValue=t}get flagDefaultValue(){return this._flagDefaultValue}set flagDefaultValue(t){this._flagDefaultValue=t}get flagMetadata(){return this._flagMetadata}set flagMetadata(t){this._flagMetadata=t}get visitorContext(){return this._visitorContext}set visitorContext(t){this._visitorContext=t}isReady(t=!0){return!(t&&!super.isReady()||!this.variationGroupId||!this.variationId)}toApiKeys(){const t={[a]:this.anonymousId||this.visitorId,[n]:this.variationId,[r]:this.variationGroupId,[o]:this.config.envId,[i]:null,[s]:Date.now()-this.createdAt};return this.visitorId&&this.anonymousId&&(t[a]=this.visitorId,t[i]=this.anonymousId),this.qaMode&&(t[e]=this.qaMode),t}toObject(){return{...super.toObject(),variationGroupId:this.variationGroupId,variationId:this.variationId}}getErrorMessage(){return u}}export{l as Activate,u as ERROR_MESSAGE};
//# sourceMappingURL=De-k8rpb.js.map
