import { Component, Host, Prop, h } from '@stencil/core';
export class SparkleValidationError {
  constructor() {
    this.errors = [];
  }
  render() {
    return (h(Host, null, this.errors.length > 0 &&
      h("div", { class: "alert alert-danger", role: "alert" },
        h("ul", null, this.errors.map(error => h("li", null,
          h("b", null,
            error.Field,
            ": "),
          error.Message))))));
  }
  static get is() { return "sparkle-validation-error"; }
  static get originalStyleUrls() { return {
    "$": ["sparkle-validation-error.css"]
  }; }
  static get styleUrls() { return {
    "$": ["sparkle-validation-error.css"]
  }; }
  static get properties() { return {
    "errors": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Array<{ Field: string, Message: string }>",
        "resolved": "{ Field: string; Message: string; }[]",
        "references": {
          "Array": {
            "location": "global"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "defaultValue": "[]"
    }
  }; }
}
