import { LayoutState } from "../common/state/LayoutState"; export class SimplySmartController { asset: any; constructor(private $window: ng.IWindowService, private $state: ng.ui.IStateService, private $stateParams: ng.ui.IStateParamsService, private $location: ng.ILocationService, assets: any, private layoutState: LayoutState, private RUNNING_EXPERIMENTS: any, private experimentService: any, private mixpanelService: any) { this.asset = assets.getAssetUrl; layoutState.title = 'Simply Smart'; layoutState.back = () => $window.history.back(); this.mixpanelService.track("QS - Viewed Simply Smart Page", { forcedToView: $stateParams["forcedToView"] }); } gotoTariffs(isSimplySmart: boolean): void { this.experimentService.saveProperty(this.RUNNING_EXPERIMENTS.SIMPLY_SMART, 'isSimplySmart', isSimplySmart); this.mixpanelService.track("QS - Simply Smart", { simplySmart: isSimplySmart }); this.$location.path('/quote').search(this.$stateParams["quoteParams"]); } }