import { Widget, WidgetProperties } from "@deuna/widget-framework";
import { CheckoutConfig, ThemeProps } from "interfaces/widget";
import CheckoutComponent from "steps/CheckoutSteps";

export interface Response {
  code: string;
  message: string;
}

export interface CardCreationWidgetProps
  extends Omit<WidgetProperties, "widgetComponentProps"> {
  WidgetComponentProps: {
    checkoutConfig: CheckoutConfig;
    themeProps?: ThemeProps;
    handleClose?: () => void;
    onExit?: () => void;
  };
}

export const cardCreationWidget = new Widget<CardCreationWidgetProps>(
  CheckoutComponent
);

export default cardCreationWidget;
