import { EventEmitter } from '../../../stencil-public-runtime';
import { FormStateSetter, PaymentIntents, ProcessorName, Order, PriceChoice } from '../../../types';
export declare class ScSessionProvider {
  /** Element */
  el: HTMLElement;
  /** Group id */
  groupId: string;
  /** Are we in test or live mode. */
  mode: 'test' | 'live';
  /** The checkout form id */
  formId: number;
  /** Whent the post was modified. */
  modified: string;
  /** An array of prices to pre-fill in the form. */
  prices: Array<PriceChoice>;
  /** Currency Code */
  currencyCode: string;
  /** Should we persist the session. */
  persist: boolean;
  /** Set the checkout state */
  setState: (state: string) => void;
  /** The processor. */
  processor: ProcessorName;
  /** Url to redirect upon success. */
  successUrl: string;
  /** Holds all available payment intents. */
  paymentIntents: PaymentIntents;
  /** Are we using the Stripe payment element? */
  stripePaymentElement: boolean;
  /** Update line items event */
  scUpdateOrderState: EventEmitter<Order>;
  /** Update line items event */
  scUpdateDraftState: EventEmitter<Order>;
  scPaid: EventEmitter<void>;
  /** Error event */
  scError: EventEmitter<{
    message: string;
    code?: string;
    data?: any;
    additional_errors?: any;
  } | {}>;
  /** Set the state */
  scSetState: EventEmitter<FormStateSetter>;
  handleUpdateSession(e: any): void;
  handlePricesChange(): Promise<void>;
  /**
   * Finalize the order.
   *
   * @returns {Promise<Order>}
   */
  finalize(): Promise<any>;
  /** Get the order from the store. */
  order(): any;
  getProcessor(): "paypal" | "stripe";
  getPaymentIntent(): import("../../../types").PaymentIntent;
  /**
   * Handles the form submission.
   * @param e
   */
  handleFormSubmit(): Promise<any>;
  /**
   * Handle paid event and update the
   */
  handlePaid(): Promise<void>;
  handlePayError(): Promise<void>;
  /** Handles coupon updates. */
  handleCouponApply(e: any): Promise<void>;
  /** Handle the error response. */
  handleErrorResponse(e: any): void;
  /** Default data always sent with the session. */
  defaultFormData(): {
    return_url: string;
    currency: any;
    live_mode: boolean;
    group_key: string;
  };
  defaultFormQuery(): {
    form_id: number;
  };
  /** Find or create session on load. */
  componentDidLoad(): void;
  /** Find or create an order */
  findOrCreateOrder(): Promise<void>;
  getInitialDataFromUrl(): {};
  /** Looks through children and finds items needed for initial session. */
  initialize(args?: {}): Promise<void>;
  /** Add prices that are passed into the component. */
  addInitialPrices(): {
    price_id: string;
    quantity: number;
  }[];
  /** Add default prices that may be selected in form. */
  addPriceChoices(line_items?: any[]): any[];
  getSessionId(): any;
  /** Fetch a session. */
  fetch(args?: {}): Promise<void>;
  /** Update a session */
  update(data?: {}, query?: {}): Promise<void>;
  /** Updates a session with loading status changes. */
  loadUpdate(data?: {}): Promise<void>;
  render(): any;
}
