import { Observable } from 'rxjs/Observable'; import { PlansConfigurationService } from '../plans-configuration-service/plans-configuration.service'; import { Subscription } from 'rxjs'; import { IUserDevice, UserDevice } from '../models/user/user-device'; import { FirebaseMobilePlansCartService } from './firebase-mobile-plans-cart.service'; import { UserPlansService } from '../user-plans-service/user-plans.service'; import { IPhoneProduct } from '../shop-configuration-service/shop-configuration'; import { IAuthStateDependentService, SimpleAuthService } from '@capellasolutions/zwp-modules/auth'; import { UserAccountService } from '../user-account-service/user-account.service'; import { CustomizableMobilePlan, IProductItem, MobilePlanItem, OptionsMobilePlanItem } from '../models/mobile-cart/mobile-plan-item'; import { IVoucherData } from '../voucher-activation-service/voucher-activation'; export interface IMobilePlansService { isPlansConfigurationReady: Observable; currentPlan: Observable; allBasePlans: MobilePlanItem[]; allAddOns: MobilePlanItem[]; setBasePlan(item: MobilePlanItem): void; setStep(step: string): void; setPlanDevice(device: UserDevice): void; setPlanExpectedDevice(device: IPhoneProduct): void; setTaxesAndFees(taxes: number, fees: number): void; startNewMobilePlan(): void; getBundleIdOfPlan(currentPlan: CustomizableMobilePlan): string; getMobilePlanByBundleId(bundleId: string): MobilePlanItem; } export declare class MobileCustomPlansService implements IMobilePlansService, IAuthStateDependentService { private _plansConf; private _simpleAuthService; private _userPlansService; private _userAccountService; private _firebaseMobilePlansCartService; static PLANS_STEPS: { PLAN: string; CHILDREN_PLANS: string; CHECKOUT: string; }; static ADD_ONS_TYPES: { BASE_PLAN: string; DATA_ADD_ON: string; TALK_AND_TEXT_ADD_ON: string; INTERNATIONAL_TALK_ADD_ON: string; }; currentPlan: Observable; isPlansConfigurationReady: Observable; isConfigurationReady: Observable; simCardConfig: Observable; allBasePlans: MobilePlanItem[]; parentBasePlans: MobilePlanItem[]; allAddOns: OptionsMobilePlanItem[]; private _isPlansConfigurationReadySubject; private _simCardConfigSubject; private _isConfigurationReadySubject; private _currentPlanSubject; private _fbUser; private _config; constructor(_plansConf: PlansConfigurationService, _simpleAuthService: SimpleAuthService, _userPlansService: UserPlansService, _userAccountService: UserAccountService, _firebaseMobilePlansCartService: FirebaseMobilePlansCartService); getNoPlanMobilePlan(): CustomizableMobilePlan; buildSubscriptions(fbUser: firebase.User): Array; onLoggedOut(): void; setBasePlan(item: MobilePlanItem): Promise; setTaxesAndFees(taxes: number, fees: number): Promise; setReferralId(referralCode: string): Promise; setStep(step: string): Promise; setPlanDevice(planDevice: IUserDevice): Promise; setPlanExpectedDevice(planExpectedDevice: IPhoneProduct): Promise; setSimCard(activationCode: string): Promise; removeVoucherCode(): Promise; setVoucherCode(voucherData: IVoucherData): Promise; setSimPurchaseQuantity(simsQuantity: number): Promise; getSelectedValueForOptionType(plan: CustomizableMobilePlan, type: string): MobilePlanItem; getBundleIdOfPlan(plan: CustomizableMobilePlan): string; getBundleIdOfPlanById(planId: string): string; getMobilePlanByBundleId(bundleId: string): MobilePlanItem; startNewMobilePlan(): Promise; private _loadPlansConfig(voucherData?); private _fillCurrentPlanFromUserCart(userCart); private _updateUserCart(partialCart); private _getFilteredAddOns(config, type, bundleId?); private _subscribeWithUserPlansAndAccountsWithConfig(); private _checkAccountBundleFromBackend(userAccount, userPlan); private _checkAccountAddOnsFromBackend(userAccount, userPlan); private _comparer(otherArray); }