import { h } from '@stencil/core';
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
export class SnkSimpleBar {
  constructor() {
    this.label = undefined;
    this.breadcrumbItens = undefined;
    this.messagesBuilder = undefined;
  }
  /**
   * Permite customizar as mensagens dos blocos de construção
   * através de um pequeno módulo na estrutura da aplicação:
   * - Crie um arquivo no seguinte caminho: /messages/appmessages.msg.js.
   * Para conhecer os detalhes do módulo, veja o arquivo neste projeto: "/src/lib/message/resources/snk-simple-bar.msg.ts"
   */
  getMessage(key, params) {
    var _a;
    if (this.messagesBuilder)
      return this.messagesBuilder.getMessage(key, params);
    if ((_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder)
      return this._application.messagesBuilder.getMessage(key, params);
  }
  componentDidLoad() {
    if (!this._element)
      return;
    ElementIDUtils.addIDInfo(this._element);
    this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
  }
  render() {
    return (h("div", { class: "simple-bar__container ez-margin-vertical--small ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
  }
  static get is() { return "snk-simple-bar"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() {
    return {
      "$": ["snk-simple-bar.css"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["snk-simple-bar.css"]
    };
  }
  static get properties() {
    return {
      "label": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Define o t\u00EDtulo do header."
        },
        "attribute": "label",
        "reflect": false
      },
      "breadcrumbItens": {
        "type": "unknown",
        "mutable": false,
        "complexType": {
          "original": "Array<IBreadcrumbItem>",
          "resolved": "IBreadcrumbItem[]",
          "references": {
            "Array": {
              "location": "global"
            },
            "IBreadcrumbItem": {
              "location": "import",
              "path": "@sankhyalabs/ezui/dist/types/components/ez-breadcrumb/ez-breadcrumb"
            }
          }
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Define os itens que ser\u00E3o apresentados no breadcrumb."
        }
      },
      "messagesBuilder": {
        "type": "unknown",
        "mutable": true,
        "complexType": {
          "original": "SnkMessageBuilder",
          "resolved": "SnkMessageBuilder",
          "references": {
            "SnkMessageBuilder": {
              "location": "import",
              "path": "../../lib/message/SnkMessageBuilder"
            }
          }
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
        }
      }
    };
  }
  static get events() {
    return [{
        "method": "clickBreadcrumbItem",
        "name": "clickBreadcrumbItem",
        "bubbles": false,
        "cancelable": true,
        "composed": true,
        "docs": {
          "tags": [],
          "text": "Emitido quando algum item do breadcrumb \u00E9 clicado."
        },
        "complexType": {
          "original": "IBreadcrumbItem",
          "resolved": "IBreadcrumbItem",
          "references": {
            "IBreadcrumbItem": {
              "location": "import",
              "path": "@sankhyalabs/ezui/dist/types/components/ez-breadcrumb/ez-breadcrumb"
            }
          }
        }
      }, {
        "method": "exit",
        "name": "exit",
        "bubbles": false,
        "cancelable": true,
        "composed": true,
        "docs": {
          "tags": [],
          "text": "Emitido quando o bot\u00E3o \"voltar\" \u00E9 acionado."
        },
        "complexType": {
          "original": "void",
          "resolved": "void",
          "references": {}
        }
      }];
  }
  static get elementRef() { return "_element"; }
}
