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

import { c as n } from "./p-c5196b3b.js";

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

const l = ":host{display:grid;block-size:100%}.opacity-0{opacity:0}.gxi-hidden{display:none !important}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-style-regular);font-size:var(--font-size-body-m);font-family:var(--font-family-body);height:100%;display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.buttons-container{display:flex;gap:var(--spacing-gap-m)}.giu-static-pill-icon-and-text,.giu-static-pill{background-color:var(--elevation-background-color, var(--color-accent-surface-elevation-1));padding-inline:var(--spacing-padding-m);color:var(--color-text-neutral-default);font-size:var(--font-size-body-s);line-height:var(--line-height-relaxed);font-weight:var(--font-style-regular);border-radius:4px;min-block-size:25px;display:inline-grid;align-items:center;pointer-events:none;inline-size:max-content}.giu-static-pill-icon-and-text{display:inline-grid;grid-auto-flow:column;grid-auto-columns:max-content;gap:var(--spacing-gap-m)}.tab-full-width-buttons::part(tab-list block-start),.tab-full-width-buttons::part(tab-list block-end){grid-auto-columns:1fr}.tab-full-width-buttons::part(tab block-start){justify-content:center}.tree-view::part(item__header){--icon__system_warning_warning--disabled:var(\n    --icon__system_warning_warning--enabled\n  )}.tabular-grid{--focus-outline-width:1px}:host{display:block}.options{max-inline-size:50%;display:flex;flex-direction:column;gap:var(--spacing-gap-m-large)}.message-item{display:flex;align-items:start;gap:var(--spacing-gap-m)}";

const r = class {
  constructor(e) {
    t(this, e);
    this.componentDidRenderFirstTime = i(this, "componentDidRenderFirstTime", 7);
    this.renderedFirstTime = false;
    // 7.LISTENERS //
    // 8.PUBLIC METHODS API //
    // 9.LOCAL METHODS //
        this.cancelHandler = () => {
      if (this.cancelCallback) {
        this.cancelCallback();
      }
    };
    this.saveCallbackHandler = () => {
      if (this.saveCallback) {
        const t = {
          installClient: this.installGxFlowEl.checked,
          futureUpgrades: this.futureUpgradesEl.value
        };
        this.saveCallback(t);
      }
    };
    this.displayTitle = false;
    this.configurationType = "installation";
    this.defaultConfiguration = {
      installClient: true,
      futureUpgrades: "automatic"
    };
    this.saveCallback = undefined;
    this.cancelCallback = undefined;
  }
  // 6.COMPONENT LIFECYCLE METHODS //
  async componentWillLoad() {
    this._componentLocale = await o.getComponentStrings(this.el);
  }
  componentDidRender() {
    if (!this.renderedFirstTime) {
      this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
      this.renderedFirstTime = true;
    }
  }
  // 10.RENDER() FUNCTION //
  render() {
    return e(s, {
      class: "gx-ide-component"
    }, e("div", {
      class: "gx-ide-main-wrapper"
    }, e("gx-ide-container", {
      slimmerFooter: n.gxIdeContainer.slimmerFooter
    }, e("div", {
      class: "message-item"
    }, e("gxg-icon", {
      type: "gx-server/changes-commit-pending",
      color: "auto",
      size: "small"
    }), e("gxg-text", null, this._componentLocale.description[this.configurationType])), e("div", {
      class: "options"
    }, e("gxg-form-checkbox", {
      label: this._componentLocale.installGxFlow,
      checked: this.defaultConfiguration.installClient,
      ref: t => this.installGxFlowEl = t
    }), e("gxg-combo-box", {
      class: "upgrades-options",
      label: this._componentLocale.manageUpgrades,
      disableFilter: true,
      value: this.defaultConfiguration.futureUpgrades,
      ref: t => this.futureUpgradesEl = t
    }, e("gxg-combo-box-item", {
      value: "automatic"
    }, this._componentLocale.upgradesOptions[0]), e("gxg-combo-box-item", {
      value: "prompt"
    }, this._componentLocale.upgradesOptions[1]), e("gxg-combo-box-item", {
      value: "never"
    }, this._componentLocale.upgradesOptions[2]))), e("gxg-text", {
      textAlign: "end",
      type: "text-regular"
    }, this._componentLocale.prompt[this.configurationType]), e("gxg-button", {
      slot: "footer-end",
      type: "outlined",
      onClick: this.cancelHandler
    }, "Cancel"), e("gxg-button", {
      slot: "footer-end",
      onClick: this.saveCallbackHandler
    }, this._componentLocale.footer.confirmButton[this.configurationType]))));
  }
  static get assetsDirs() {
    return [ "gx-ide-assets/wf-settings" ];
  }
  get el() {
    return a(this);
  }
};

r.style = l;

export { r as gx_ide_wf_settings };
//# sourceMappingURL=p-123ef674.entry.js.map