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

import { g as s } from "./p-d42e842b.js";

import "./p-6534555e.js";

import "lit";

import "lit/directives/when.js";

import "lit/directives/if-defined.js";

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

import { A as n } from "./p-91e2ebb0.js";

const l = "button.button-secondary{border-color:var(--color-border-neutral-default)}:host{--wrapper-copacity:0;--wrapper-min-inline-size:700px;--wrapper-max-inline-size:1040px;--wrapper-block-size:640px;transition:var(--timing-regular) opacity;display:flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%;padding:var(--spacing-padding-xl);overflow:auto}.wrapper{flex:1;display:grid;grid-template-columns:1fr var(--wrapper-block-size);block-size:var(--wrapper-block-size);max-inline-size:var(--wrapper-max-inline-size);background-color:var(--color-accent-surface-elevation-1);border-radius:12px;overflow:auto;transform:translateY(4px)}.side-inline-start{background-size:cover}.side-inline-end{position:relative;display:grid;grid-template-rows:max-content 1fr max-content;padding-block:64px;padding-inline:80px;transition:var(--timing-slow) grid-template-rows;overflow:auto}.close-button{position:absolute;inset-inline-end:0;inset-block-start:0}.header{display:grid;gap:var(--spacing-gap-xl);margin-block-end:92px}.header__logo__close-button{display:flex;justify-content:space-between}.title{color:var(--color-text-neutral-strawberry);letter-spacing:0.02em}.next-version{color:var(--color-text-neutral-strawberry)}.header__description{color:var(--color-text-neutral-disabled);line-height:1.45 !important}.main{display:flex;flex-direction:column;gap:var(--spacing-gap-l);overflow:auto}.log__container{--logVisibleLines:7;--logFontSize:var(\n    --font-size-body-s\n  );--logLineHeight:var(\n    --line-height-relaxed\n  );--logGap:4px;--logContainerBlockSize:calc(\n    var(--logFontSize) * var(--logLineHeight) * var(--logVisibleLines) +\n      calc(var(--logGap) * (var(--logVisibleLines) - 1))\n  );block-size:var(--logContainerBlockSize);font-family:var(--font-family-code);color:var(--color-text-neutral-disabled);display:flex;flex-direction:column-reverse;gap:var(--logGap);overflow:hidden}.log__container:hover{overflow:auto}.log__container>p{font-family:inherit}.log__message{opacity:0;transition:var(--timing-regular) opacity;animation:fadeInLogMessage 0.45s ease-out forwards}.log__message--error{color:var(--color-text-error-default)}.footer{display:grid;grid-auto-rows:max-content;gap:var(--spacing-gap-l);margin-block-start:24px}.error-message{color:var(--color-text-error-default);margin-block-start:auto;display:-webkit-box;-webkit-line-clamp:2}.status--processing{display:flex;flex-direction:row;align-items:baseline;gap:var(--spacing-gap-xs)}@keyframes fadeInLogMessage{from{opacity:0}to{opacity:1}}";

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

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

var p;

const g = e(`./gx-ide-assets/splash/images/copyrights-illustration.svg`);

const u = e(`./gx-ide-assets/welcome-page/images/icon-next.svg`);

const h = [ "resets/box-sizing", "utils/typography", "components/button", "components/icon", "chameleon/scrollbar" ];

const f = s({
  category: "system",
  name: "launch",
  colorType: "primary"
});

const m = class {
  constructor(e) {
    t(this, e);
    /**
         * The component hard-coded strings translations.
         */
    // eslint-disable-next-line @stencil-community/own-props-must-be-private
        p.set(this, void 0);
    this.ariaBusy = true;
    this.appVersion = undefined;
    this.downloadDockerCallback = undefined;
    this.quitCallback = undefined;
    this.messages = [];
    this.openLogCallback = undefined;
    this.showQuitButton = false;
    this.showOpenLogLink = false;
    this.showDockerMissingError = false;
  }
  async componentWillLoad() {
    c(this, p, await a.getComponentStrings(this.el), "f");
  }
  render() {
    var e, t;
    const o = this.showOpenLogLink && this.openLogCallback;
    const s = this.showQuitButton && this.quitCallback && this.messages.length > 0;
    const a = !(this.showQuitButton && this.quitCallback) && ((e = this.messages) === null || e === void 0 ? void 0 : e.length) > 0;
    const l = this.showDockerMissingError || !a;
    let c = d(this, p, "f").warnings.installationFailed;
    if (o) {
      c = `${c} ${d(this, p, "f").warnings.checkTheLog}`;
    }
    return i(r, null, i("ch-theme", {
      model: h
    }), i("div", {
      class: {
        scrollable: true,
        wrapper: true
      }
    }, i("div", {
      class: "side-inline-start",
      style: {
        backgroundImage: `url(${g})`
      },
      role: "img"
    }), i("section", {
      class: "side-inline-end scrollable"
    }, i("header", {
      class: "header"
    }, i("img", {
      src: u,
      alt: d(this, p, "f").illustrationAlternativeText
    }), i("h2", {
      class: "title heading-2"
    }, d(this, p, "f").title), this.appVersion && i("p", {
      class: "body-regular-m next-version"
    }, d(this, p, "f").nextVersion, " ", this.appVersion), i("p", {
      class: "body-italic-m header__description"
    }, d(this, p, "f").allRightsReserved), i("p", {
      class: "body-italic-m header__description"
    }, d(this, p, "f").copyright)), i("main", {
      class: "main"
    }, a && i("p", {
      class: {
        "body-regular-m": true,
        "status--processing": true
      }
    }, d(this, p, "f").initializingServices, n("tiny", "on-surface")), i("code", {
      class: "log__container scrollable",
      role: "status",
      "aria-live": "polite",
      "aria-busy": this.ariaBusy
    }, (t = this.messages) === null || t === void 0 ? void 0 : t.reverse().map(((e, t) => i("p", {
      class: {
        "caption-regular-l": true,
        log__message: true,
        "log__message--error": e.type === "error"
      },
      key: this.messages.length - t
    }, e.text)))), l && i("p", {
      class: "error-message status--error body-regular-m"
    }, s && i("span", null, c), s && this.showDockerMissingError && i("span", null, " - "), this.showDockerMissingError && i("span", null, d(this, p, "f").warnings.dockerMissing))), i("footer", {
      class: "footer"
    }, i("div", {
      class: "buttons-spacer"
    }, this.showDockerMissingError && i("button", {
      key: "download-docker",
      class: "button-secondary button-icon-and-text download-docker-button",
      onClick: this.downloadDockerCallback
    }, d(this, p, "f").downloadDocker), o && i("button", {
      key: "open-log",
      class: "button-tertiary button-icon-and-text",
      onClick: this.openLogCallback
    }, i("ch-image", {
      class: "icon-m",
      src: f
    }), d(this, p, "f").openLog), this.quitCallback && this.showQuitButton && i("button", {
      class: "button-secondary",
      onClick: this.quitCallback
    }, d(this, p, "f").quitGenexus))))));
  }
  static get assetsDirs() {
    return [ "gx-ide-assets/splash" ];
  }
  get el() {
    return o(this);
  }
};

p = new WeakMap;

m.style = l;

export { m as gx_ide_splash };
//# sourceMappingURL=p-98dbb43d.entry.js.map