import { r as e, c as t, h as s, H as i, a as r } from "./p-9b9ccd0c.js";

import { L as o } from "./p-311eedf3.js";

const l = ":host{display:block}gx-ide-list-selector::part(list){display:flex;flex-direction:row;padding:var(--spacing-padding-xs)}gx-ide-list-selector-item{flex:1;text-align:center;}gx-ide-list-selector-item .label{display:grid;inline-size:fit-content}gx-ide-list-selector-item .label__wrapper{grid-template-columns:max-content}gx-ide-list-selector-item .label__description{text-transform:capitalize}gx-ide-list-selector-item .pseudo-checkbox{position:relative;inline-size:var(--control-tiny-size);block-size:var(--control-tiny-size);outline:1px solid var(--control-border-color-enabled);border-radius:1px}gx-ide-list-selector-item input:after{display:none}gx-ide-list-selector-item input+.label .label__wrapper{display:inline-grid;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;justify-content:center}gx-ide-list-selector-item input:checked+.label .pseudo-checkbox{outline-color:var(--color-border-primary-default)}gx-ide-list-selector-item input:checked+.label .pseudo-checkbox::before{content:\"\";position:absolute;inline-size:100%;block-size:100%;inset-inline-start:0;inset-block-start:0;-webkit-mask:no-repeat center/8px url(\"data:image/svg+xml, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='currentColor' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/></svg>\");background-color:var(--color-accent-neutral-on-surface)}:host([compact]) gx-ide-list-selector-item{font-size:var(--font-size-body-s)}:host([compact]) .label__wrapper{padding:2px 8px 2px 4px}:host([compact]) .label__wrapper:before{top:10px}:host([compact]) .label__universal-slot{margin-inline-end:2px}:host([no-inner-borders]) gx-ide-list-selector-item{border-inline-end:none}";

var n = undefined && undefined.__classPrivateFieldGet || function(e, t, s, i) {
  if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
  if (typeof t === "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return s === "m" ? i : s === "a" ? i.call(e) : i ? i.value : t.get(e);
};

var a = undefined && undefined.__classPrivateFieldSet || function(e, t, s, i, r) {
  if (i === "m") throw new TypeError("Private method is not writable");
  if (i === "a" && !r) throw new TypeError("Private accessor was defined without a setter");
  if (typeof t === "function" ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return i === "a" ? r.call(e, s) : r ? r.value = s : t.set(e, s), s;
};

var c;

const d = class {
  constructor(s) {
    e(this, s);
    this.selectionChanged = t(this, "selectionChanged", 7);
    /**
         * The component hard-coded strings translations.
         */
    // eslint-disable-next-line @stencil-community/own-props-must-be-private
        c.set(this, void 0);
    this.evaluateIconsSize = () => {
      if (this.compact) {
        this.iconsSize = "small";
      }
    };
    this.evaluateLabel = e => {
      const t = this[e];
      if (this.minimal) {
        return `${t}`;
      } else {
        const s = t === 1;
        return s ? `${t} ${n(this, c, "f")[e]["singular"]}` : `${t} ${n(this, c, "f")[e]["plural"]}`;
      }
    };
    this.selectionChangedHandler = e => {
      e.stopPropagation();
      this.selectionChanged.emit(e.detail);
    };
    this.active = false;
    this.errors = 0;
    this.hideError = false;
    this.warnings = 0;
    this.hideWarning = false;
    this.successes = 0;
    this.hideSuccess = false;
    this.messages = 0;
    this.hideMessage = false;
    this.minimal = false;
    this.compact = false;
    this.noInnerBorders = false;
    this.iconsSize = "small";
  }
  async componentWillLoad() {
    a(this, c, await o.getComponentStrings(this.el), "f");
    this.evaluateIconsSize();
  }
  render() {
    return s(i, null, s("gx-ide-list-selector", {
      type: "multi-selection",
      listName: "status-buttons",
      noListBorder: true,
      ellipsis: true,
      onSelectionChanged: this.selectionChangedHandler
    }, !this.hideError ? s("gx-ide-list-selector-item", {
      itemId: "errors",
      itemValue: this.evaluateLabel("errors"),
      icon: "gx-test/result-exception",
      class: {
        error: true,
        "not-zero": this.errors !== 0
      },
      itemChecked: true
    }, s("span", {
      slot: "universal",
      class: {
        "pseudo-checkbox": true
      }
    })) : null, !this.hideWarning ? s("gx-ide-list-selector-item", {
      itemId: "warnings",
      itemValue: this.evaluateLabel("warnings"),
      icon: "gx-test/result-warning",
      class: {
        warning: true,
        "not-zero": this.warnings !== 0
      },
      itemChecked: true
    }, s("span", {
      slot: "universal",
      class: {
        "pseudo-checkbox": true
      }
    })) : null, !this.hideSuccess ? s("gx-ide-list-selector-item", {
      itemId: "successes",
      itemValue: this.evaluateLabel("successes"),
      icon: "gx-test/result-ok",
      class: {
        success: true,
        "not-zero": this.successes !== 0
      },
      itemChecked: true
    }, s("span", {
      slot: "universal",
      class: {
        "pseudo-checkbox": true
      }
    })) : null, !this.hideMessage ? s("gx-ide-list-selector-item", {
      itemId: "messages",
      itemValue: this.evaluateLabel("messages"),
      icon: "gx-test/screenshot-viewer",
      class: {
        message: true,
        "not-zero": this.messages !== 0
      },
      itemChecked: true
    }, s("span", {
      slot: "universal",
      class: {
        "pseudo-checkbox": true
      }
    })) : null));
  }
  static get assetsDirs() {
    return [ "gx-ide-assets/status-buttons" ];
  }
  get el() {
    return r(this);
  }
};

c = new WeakMap;

d.style = l;

export { d as gx_ide_status_buttons };
//# sourceMappingURL=p-6941599f.entry.js.map