UNPKG

@spartacus/storefront

Version:

Spartacus Storefront is a package that you can include in your application, which allows you to add default storefront features.

33 lines (32 loc) 1.61 kB
import { OnDestroy, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { ActiveCartService, Cart, CartVoucherService, CustomerCoupon, CustomerCouponService } from '@spartacus/core'; import { Observable, Subscription } from 'rxjs'; import * as i0 from "@angular/core"; export declare class CartCouponComponent implements OnInit, OnDestroy { protected cartVoucherService: CartVoucherService; protected formBuilder: FormBuilder; protected customerCouponService: CustomerCouponService; protected activeCartService: ActiveCartService; MAX_CUSTOMER_COUPON_PAGE: number; couponForm: FormGroup; cartIsLoading$: Observable<boolean>; cart$: Observable<Cart>; cartId: string; applicableCoupons: CustomerCoupon[]; protected ignoreCloseEvent: boolean; protected subscription: Subscription; couponBoxIsActive: boolean; constructor(cartVoucherService: CartVoucherService, formBuilder: FormBuilder, customerCouponService: CustomerCouponService, activeCartService: ActiveCartService); ngOnInit(): void; protected onError(error: boolean): void; onSuccess(success: boolean): void; protected getApplicableCustomerCoupons(cart: Cart, coupons: CustomerCoupon[]): void; applyVoucher(): void; applyCustomerCoupon(couponId: string): void; close(event: UIEvent): void; disableClose(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<CartCouponComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<CartCouponComponent, "cx-cart-coupon", never, {}, {}, never, never>; }