import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
import { SubscriptionsService } from '../../services';
import { SubtrakService } from '../../services/subtrak.service';
import { PriceWithEntitlements, EntitlementValue, PaymentMode, CreateSubscriptionResult, PaymentUrlReadyEvent } from '../../models';
import * as i0 from "@angular/core";
/**
* Displays available subscription plans with feature comparison
*
* @example
* ```html
*
*
*
*
*
*
*
*
*
*
*
* ```
*/
export declare class PricingTableComponent implements OnInit, OnDestroy {
private subscriptionsService;
private subtrak;
/**
* Optional: Customer ID to auto-fetch country code
*/
customerId?: string;
/**
* Optional: ISO country code to filter plans (e.g., 'US', 'EG')
* If not provided and customerId is provided, will be fetched automatically
*/
countryCode?: string;
/**
* Current plan ID to highlight
*/
currentPlanId?: string;
/**
* Entitlement codes to highlight in feature lists
*/
highlightEntitlements?: string[];
/**
* If true, automatically creates subscription when plan is selected
* Follows Paymob/Stripe flow: create subscription → handle payment if required
*/
autoCreateSubscription: boolean;
/**
* Payment mode when autoCreateSubscription is enabled
* - 'new-window': Opens payment URL in new tab (default)
* - 'redirect': Redirects current window to payment URL
* - 'iframe': Emits paymentUrlReady event for parent to render iframe
*/
paymentMode: PaymentMode;
/**
* Emitted when a plan is selected (legacy, for backward compatibility)
* Still emitted even when autoCreateSubscription is true
*/
planSelected: EventEmitter;
/**
* Emitted when subscription is successfully created
* Only emitted when autoCreateSubscription is true
*/
subscriptionCreated: EventEmitter;
/**
* Emitted when payment URL is ready (iframe mode)
* Only emitted when autoCreateSubscription is true and paymentMode is 'iframe'
*/
paymentUrlReady: EventEmitter;
/**
* Emitted when subscription creation fails
* Only emitted when autoCreateSubscription is true
*/
subscriptionError: EventEmitter;
planOptions: {
name: string;
description: string | null;
prices: PriceWithEntitlements[];
}[];
plans: PriceWithEntitlements[];
billingInterval: 'MONTHLY' | 'YEARLY';
loading: boolean;
error: string | null;
creatingSubscription: boolean;
private destroy$;
constructor(subscriptionsService: SubscriptionsService, subtrak: SubtrakService);
ngOnInit(): Promise;
ngOnDestroy(): void;
private fetchCustomerCountry;
loadPlans(): void;
setBillingInterval(interval: 'MONTHLY' | 'YEARLY'): void;
private updateVisiblePlans;
/**
* Check if a plan is the current plan
*/
isCurrentPlan(priceId: string): boolean;
/**
* Check if an entitlement should be highlighted
*/
isHighlighted(entitlement: EntitlementValue): boolean;
/**
* Handle plan selection
*/
selectPlan(plan: PriceWithEntitlements): void;
/**
* Create subscription for selected plan (auto-create flow)
*/
private createSubscriptionForPlan;
/**
* Handle payment requirement based on payment mode
*/
private handlePaymentRequired;
/**
* Get formatted price display
*/
getPriceDisplay(plan: PriceWithEntitlements): string;
/**
* Get billing interval display text
*/
getBillingIntervalDisplay(plan: PriceWithEntitlements): string;
/**
* Format entitlement value for display
*/
formatEntitlementValue(entitlement: EntitlementValue): string;
/**
* Get button text for a plan
*/
getButtonText(plan: PriceWithEntitlements): string;
/**
* Track by function for ngFor optimization
*/
trackByPlanId(index: number, plan: PriceWithEntitlements): string;
/**
* Track by function for entitlements
*/
trackByEntitlementCode(index: number, entitlement: EntitlementValue): string;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
}