import { r as registerInstance, e as createEvent, h, g as getElement } from './index-e9c7ceaa.js';
import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';

const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";

const SnkSimpleBar = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.clickBreadcrumbItem = createEvent(this, "clickBreadcrumbItem", 3);
    this.exit = createEvent(this, "exit", 3);
    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" }))));
  }
  get _element() { return getElement(this); }
};
SnkSimpleBar.style = snkSimpleBarCss;

export { SnkSimpleBar as snk_simple_bar };
