import { CurrencyPipe } from '@angular/common'; import { ActivatedRoute, Router } from '@angular/router'; import { ValueOf } from '@pv-frontend/pv-shared-services/common'; import { DeviceService } from '@pv-frontend/pv-shared-services/device-service'; import { JourneyMetadataService } from '@pv-frontend/pv-shared-services/journey-metadata-service'; import { PvUserService } from '@pv-frontend/pv-shared-services/pv-user-service'; import { Subject } from 'rxjs'; import { GlobalConfig } from '../common/interfaces/journey.interface'; import { BenefitAttributes, BenefitResponseDisp, Discount, PriceDataInterface, UnlockedBenefit } from '../interfaces/benefit-response'; import { UnlockedBenefitsBookingData, benefitsArrayResponse, benefitsStatusGroup, bookingBenefitAttributesResponse, CardDescriptionParams, BundleHistoryResponseData, ParsedBundleHistory } from '../interfaces/history'; import { OfferAttributes, OfferRedeemCTA } from '../interfaces/offer.interface'; import { RedemptionChannel } from '../redemption/interfaces/redemption.interface'; import { GvCheckoutService } from '../redemption/services/checkout/checkout.service'; import { RedemptionService } from '../redemption/services/redemption/redemption.service'; import { PaymentMethod } from './../redemption/interfaces/checkout.Interface'; import * as i0 from "@angular/core"; export type statusTypes = { complete: string; booking_confirmed: string; abandoned: string; refunded: string; failed: string; booking_failed: string; failed_response: string; initiated: string; created: string; pending: string; processing: string; failed_exception: string; awaiting: string; success: string; failure: string; }; export type MiscellaneousBenefitInfo = 'isUnlockedBenefitApplicable'; export declare const BundlePriceTypeDescriptionFormat: { readonly PRICE_QUANTITY_UNIT: "price-quantity-unit"; readonly QUANTITY_BENEFIT_PRICE: "quantity-benefit-price"; readonly QUANTITY_UNIT_PRICE: "quantity-unit-price"; }; export type BundlePriceTypeDescriptionFormats = ValueOf; export declare const PAGES: { authentication: string; redemption: string; }; export declare class SharedGVLogicService { private redemptionService; private activatedRoute; journeyMetadataService: JourneyMetadataService; private gvCheckoutService; pvUserService: PvUserService; private currencyPipe; deviceService: DeviceService; private router; /**TODO: optimize the folowing BOOKING_STATUS and its useage */ private readonly BOOKING_STATUS; UNLOCKED_BOGO_BENEFIT_ORDER_STATUSES: { readonly INITIATED: "processing"; readonly PENDING: "processing"; readonly PROCESSING: "processing"; readonly FAILED: "failed"; readonly COMPLETED: "confirmed"; }; private DEFAULT_IMAGE_PLACEHOLDER; private DEFAULT_COIN_ICON; DEFAULT_DATE_FORMAT: string; DEFAULT_DATE_TIME_FORMAT: string; DEFAULT_NO_VOUCHER_TEXT: string; DEFAULT_NOT_ELIGIBLE_LABEL: string; DEFAULT_MERCHANT_NAVIGATE_LABEL: string; DEFAULT_OFFER_CARD_ACTION_LABEL: string; DEFAULT_VIEW_CODE_LABEL: string; updateUserPoints$: Subject; readonly TRAILING_ZEROS_REGEX: RegExp; metaDefault: { current_page: number; per_page: number; total_entries: number; }; isPointsIconFirst: boolean; pointsLabel: string; isDeviceMobile: boolean; DEFAULT_OFFER_REDEEM_CTA: OfferRedeemCTA; constructor(redemptionService: RedemptionService, activatedRoute: ActivatedRoute, journeyMetadataService: JourneyMetadataService, gvCheckoutService: GvCheckoutService, pvUserService: PvUserService, currencyPipe: CurrencyPipe, deviceService: DeviceService, router: Router); generateBenefits(benefitType: string, data: bookingBenefitAttributesResponse, descriptionFormat: BundlePriceTypeDescriptionFormats): benefitsStatusGroup; generateGCBundleDetails(response: BundleHistoryResponseData): ParsedBundleHistory; private generateGCBundleBenefits; generateBundleBenefits(data: UnlockedBenefitsBookingData[], descriptionFormat?: BundlePriceTypeDescriptionFormats): benefitsArrayResponse[]; createBogoObject(unlockedBogoBenefit: UnlockedBenefit | undefined): UnlockedBenefit | undefined; /** TODO: use currency format instead of ₹ */ generateString: { "price-quantity-unit": (params: CardDescriptionParams) => string; "quantity-unit-price": (params: CardDescriptionParams) => string; "quantity-benefit-price": (params: CardDescriptionParams) => string; }; closeLoginAlert(): void; getPriceData(data: BenefitAttributes): PriceDataInterface; /** * * @param discount Discount object which has discount type and value * @param price Price of the respective benefit * @returns The effective price after deducting discount from the original price */ calculateDiscount(discount: Discount, price: number): number; getPerkDiscountLabel(discountObject: Discount, trailingString?: string): string; getPerkDiscountLabelForPercentageDiscount(discountInPercentage: number, trailingString?: string): string; private formatDiscountInPercentage; private getExpiry; generateBenefitCardData(data: { id: string; attributes: BenefitAttributes; }): BenefitResponseDisp; generateDiscountTitle(data: BenefitAttributes): string; getGlobalConfig(): GlobalConfig; getCoinIconName(): string; hasCardBasedDiscounts(): boolean; getPointsLabelName(): string; getImagePlaceholder(): string; getNoVoucherText(): string; getNotEligibleLabel(): string; getMerchantNavigateLabel(): string; getOfferCardLabel(offer?: OfferAttributes, offerCount?: number): string; isCardBasedLogin(): boolean; allowedPaymentMethods(): PaymentMethod[]; includeLedger(): boolean; includeLoginFlow: boolean; hideLogoutBtn: boolean; /** TODO: Move this and the header outside gift-vouchers */ getPoints(id?: string, skipExistingCheck?: boolean): Promise; formatCurrency(currency: number, symbol?: string): string; handleRedeemGv(id: string, merchantName: string, isBenefitOffer?: boolean, offerId?: string, miscellaneousBenefitInfo?: Record): void; formatRedemptionChannels(redemptionChannels: RedemptionChannel[] | undefined, separator?: string): string; navigateToMerchant(redemptionUrl: string): void; checkClaimedStatus(offerData: OfferAttributes): OfferRedeemCTA; onEarnMoreClick(): void; generateQueryString(obj: Record): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }