import { Connection } from '@manifoldco/manifold-init-types/types/v0'; import { ProductQuery } from '../../types/graphql'; declare type ProductFixed = ProductQuery['product']['fixedFeatures']['edges'][0]['node']; declare type ProductMetered = ProductQuery['product']['meteredFeatures']['edges'][0]['node']; declare type ProductConfigurable = ProductQuery['product']['configurableFeatures']['edges'][0]['node']; interface ProductFeatures { fixed: { [label: string]: ProductFixed; }; metered: { [label: string]: ProductMetered; }; configurable: { [label: string]: ProductConfigurable; }; } declare type ProductPlan = ProductQuery['product']['plans']['edges'][0]['node']; declare type PlanFixedFeature = ProductPlan['fixedFeatures']['edges'][0]['node']; declare type PlanMeteredFeature = ProductPlan['meteredFeatures']['edges'][0]['node']; declare type PlanConfigurableFeature = ProductPlan['configurableFeatures']['edges'][0]['node']; interface PlanFeatures { [planID: string]: { [featureLabel: string]: PlanFixedFeature | PlanMeteredFeature | PlanConfigurableFeature | undefined; }; } declare type UserValue = string | number | boolean; interface UserSelection { [planID: string]: { [featureLabel: string]: UserValue; }; } export declare class ManifoldPricing { el: HTMLElement; productId?: string; clientId?: string; baseUrl?: string; gatewayUrl?: string; ctaText?: string; env?: 'stage' | 'local' | 'prod'; product?: ProductQuery['product']; productFeatures: ProductFeatures; planCosts: { [planID: string]: number; }; planFeatures: PlanFeatures; userSelection: UserSelection; refetchProduct(newVal?: string): void; connection: Connection; componentWillLoad(): Promise; setupProduct(productID: string): Promise; fetchCosts(): void; handleCtaClick(e: MouseEvent, planId: string, destination?: string): void; setFeature({ planID, featureLabel, featureValue, }: { planID: string; featureLabel: string; featureValue: UserValue; }): void; displayConfigurable({ planID, feature }: { planID: string; feature: PlanConfigurableFeature; }): any; render(): any; } export {};