import { Component, Event, h, Host, Prop } from "@stencil/core";
export class CorejamFormSubmit {
  onClick(e) {
    e.preventDefault(),
      this.formSubmit.emit({
        name: this.formId,
        type: "submit",
      });
  }
  render() {
    return (h(Host, { onClick: (e) => this.onClick(e), "data-cy": `submit-${this.formId}` },
      h("slot", null)));
  }
  static get is() { return "corejam-form-submit"; }
  static get properties() { return {
    "formId": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "form-id",
      "reflect": true
    }
  }; }
  static get events() { return [{
      "method": "formSubmit",
      "name": "formSubmit",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
}
