var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component, h, Element, Prop, Watch, Host } from '@stencil/core';
import { sanitizeVegaComponent } from '../../utils/component';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer, methodPlaceholder, } from 'vega-slimmer/core';
import { VegaFieldErrorMessageController } from './slimmers/controllers/vega-field-error-message-controller';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
/**
 * @vegaVersion 1.45.0
 */
/** The VegaFieldBox class is a TypeScript React component that renders a box with a message and a slot for additional content. */
export class VegaFieldError {
  constructor() {
    this.globalSlimmers = {};
    this.messageController = new VegaFieldErrorMessageController();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    /**
     * Specifies the error message when the input field should display an error.
     *    The input field will clear the error status when the message is empty.
     *
     * @vegaVersion 1.45.0
     */
    this.message = '';
  }
  watchMessage() {
    methodPlaceholder();
  }
  render() {
    return sanitizeVegaComponent(h(Host, null,
      h("slot", null)), this.host);
  }
  static get is() { return "vega-field-error"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-field-error.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-field-error.css"]
  }; }
  static get properties() { return {
    "message": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.45.0"
          }],
        "text": "Specifies the error message when the input field should display an error.\n   The input field will clear the error status when the message is empty."
      },
      "attribute": "message",
      "reflect": false,
      "defaultValue": "''"
    }
  }; }
  static get elementRef() { return "host"; }
  static get watchers() { return [{
      "propName": "message",
      "methodName": "watchMessage"
    }]; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaFieldError.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaFieldError.prototype, "messageController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaFieldError.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
