"use strict";(self.webpackChunk_flagship_io_js_sdk=self.webpackChunk_flagship_io_js_sdk||[]).push([[178],{7178:(t,a,i)=>{i.r(a),i.d(a,{Activate:()=>o,ERROR_MESSAGE:()=>r});var e=i(3641),s=i(8068);const r="variationGroupId and variationId are required";class o extends s.HitAbstract{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:r,flagMetadata:o,visitorContext:n}=t;this.variationGroupId=a,this.variationId=i,this.flagKey=e,this.flagValue=s,this.flagDefaultValue=r,this.flagMetadata=o,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(){return!((!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&!super.isReady()||!this.variationGroupId||!this.variationId)}toApiKeys(){const t={[e.VISITOR_ID_API_ITEM]:this.anonymousId||this.visitorId,[e.VARIATION_ID_API_ITEM]:this.variationId,[e.VARIATION_GROUP_ID_API_ITEM_ACTIVATE]:this.variationGroupId,[e.CUSTOMER_ENV_ID_API_ACTIVATE]:this.config.envId,[e.ANONYMOUS_ID]:null,[e.QT_API_ITEM]:Date.now()-this.createdAt};return this.visitorId&&this.anonymousId&&(t[e.VISITOR_ID_API_ITEM]=this.visitorId,t[e.ANONYMOUS_ID]=this.anonymousId),this.qaMode&&(t[e.QA_MODE_API_ITEM]=this.qaMode),t}toObject(){return{...super.toObject(),variationGroupId:this.variationGroupId,variationId:this.variationId}}getErrorMessage(){return r}}}}]);
//# sourceMappingURL=178.223454302ed2f6236eca.js.map