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, Element, Event, Prop, Watch } from '@stencil/core';
import { sanitizeVegaComponent } from '../../utils/component';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer, methodPlaceholder, } from 'vega-slimmer/core';
import { VegaBackdropVisibleController } from './slimmers/controller/vega-backdrop-visible-controller';
import { VegaBackdropRenderer } from './slimmers/renerers/vega-backdrop-renderer';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
/**
 * @vegaVersion 2.0.0
 */
export class VegaBackdrop {
  constructor() {
    this.globalSlimmers = {};
    this.vegaBackdropVisibleController = new VegaBackdropVisibleController();
    this.vegaBackdropRenderer = new VegaBackdropRenderer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    /**
     * Defines the color of the backdrop element.
     *
     * @vegaVersion 2.0.0
     */
    this.color = 'bg-backdrop-modal';
    /**
     * Whether to show or hide the backdrop
     *
     * @vegaVersion 2.0.0
     */
    this.visible = false;
  }
  watchVisible() {
    methodPlaceholder();
  }
  render() {
    return sanitizeVegaComponent(this.vegaBackdropRenderer.render(), this.host);
  }
  static get is() { return "vega-backdrop"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-backdrop.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-backdrop.css"]
  }; }
  static get properties() { return {
    "color": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'bg-backdrop-modal' | 'bg-backdrop-popover' | 'bg-transparent'",
        "resolved": "\"bg-backdrop-modal\" | \"bg-backdrop-popover\" | \"bg-transparent\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.0.0"
          }],
        "text": "Defines the color of the backdrop element."
      },
      "attribute": "color",
      "reflect": false,
      "defaultValue": "'bg-backdrop-modal'"
    },
    "visible": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.0.0"
          }],
        "text": "Whether to show or hide the backdrop"
      },
      "attribute": "visible",
      "reflect": false,
      "defaultValue": "false"
    },
    "duration": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.0.0"
          }],
        "text": "The duration of the animation in milliseconds."
      },
      "attribute": "duration",
      "reflect": false
    }
  }; }
  static get events() { return [{
      "method": "vegaClick",
      "name": "vegaClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.0.0"
          }],
        "text": "An event emitter notifying the click event of the backdrop."
      },
      "complexType": {
        "original": "void",
        "resolved": "void",
        "references": {}
      }
    }]; }
  static get elementRef() { return "host"; }
  static get watchers() { return [{
      "propName": "visible",
      "methodName": "watchVisible"
    }]; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaBackdrop.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaBackdrop.prototype, "vegaBackdropVisibleController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaBackdrop.prototype, "vegaBackdropRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaBackdrop.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
