import { Component, Event, h, Prop } from "@stencil/core";
export class PayfuncMethodAdd {
  submit(event) {
    event.preventDefault();
    this.add.emit(event.detail.method);
  }
  render() {
    return [
      h("payfunc-onboard", { account: this.account, onCreate: (event) => this.submit(event), "api-key": this.apiKey }),
    ];
  }
  static get is() { return "payfunc-payment-method-add"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() { return {
    "$": ["style.css"]
  }; }
  static get styleUrls() { return {
    "$": ["style.css"]
  }; }
  static get properties() { return {
    "apiKey": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "api-key",
      "reflect": false
    },
    "account": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Account",
        "resolved": "Account",
        "references": {
          "Account": {
            "location": "import",
            "path": "@payfunc/model"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
  static get events() { return [{
      "method": "add",
      "name": "add",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "Account",
        "resolved": "Account",
        "references": {
          "Account": {
            "location": "import",
            "path": "@payfunc/model"
          }
        }
      }
    }]; }
}
