import { h, Host } from '@stencil/core';
export class SnkCustomSlotGuide {
  constructor() {
    this.slotName = 'CUSTOM_SLOT_GUIDE';
  }
  onGuideChange(evt) {
    const guideName = evt.detail;
    if (guideName === this.slotName) {
      this._element.style.setProperty('display', 'block');
    }
    else {
      this._element.style.setProperty('display', 'none');
    }
  }
  onFormConfigVisibilityChange(evt) {
    const isFormConfigVisible = evt.detail;
    if (isFormConfigVisible) {
      this._element.style.setProperty('display', 'none');
    }
  }
  componentDidLoad() {
    this.snkCustomSlotGuideLoaded.emit(this.slotName);
  }
  render() {
    return (h(Host, { slot: this.slotName, id: this.slotName, class: "custom-slot-guide-container" }, h("slot", null)));
  }
  static get is() { return "snk-custom-slot-guide"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() {
    return {
      "$": ["snk-custom-slot-guide.css"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["snk-custom-slot-guide.css"]
    };
  }
  static get properties() {
    return {
      "slotName": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Nome do slot onde os elementos customizados dever\u00E3o aparecer."
        },
        "attribute": "slot-name",
        "reflect": false,
        "defaultValue": "'CUSTOM_SLOT_GUIDE'"
      }
    };
  }
  static get events() {
    return [{
        "method": "snkCustomSlotGuideLoaded",
        "name": "snkCustomSlotGuideLoaded",
        "bubbles": true,
        "cancelable": true,
        "composed": true,
        "docs": {
          "tags": [],
          "text": "Emitido quando elemento \u00E9 carregado na tela."
        },
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        }
      }];
  }
  static get elementRef() { return "_element"; }
  static get listeners() {
    return [{
        "name": "snkShowGuide",
        "method": "onGuideChange",
        "target": "window",
        "capture": false,
        "passive": false
      }, {
        "name": "formConfigVisibilityChanged",
        "method": "onFormConfigVisibilityChange",
        "target": "window",
        "capture": false,
        "passive": false
      }];
  }
}
