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

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

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

import "lit";

import "lit/directives/when.js";

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

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

const n = '@charset "UTF-8";button.button-secondary{border-color:var(--color-border-neutral-default)}:host{display:grid;block-size:100%;grid-auto-rows:max-content;justify-content:center;padding:95px 24px 95px 24px;overflow:auto}.licenses-descriptions-list,.licenses-names-list{list-style:none;margin:0;padding:0}.main-wrapper{max-inline-size:1000px;display:grid;gap:var(--spacing-gap-xxxl)}.logo{inline-size:201px;block-size:41px;margin:0 auto;margin-block-end:40px;opacity:0;transform:translateY(4px);animation:showLogo var(--timing-regular) ease-out forwards;animation-delay:var(--timing-regular);background-color:var(--color-icon-neutral-default)}@keyframes showLogo{100%{opacity:1;transform:translateY(0)}}.card{display:grid;border-radius:4px;border-width:1px;border-color:var(--elevation-border-color);border-style:solid;padding:var(--spacing-padding-xxl);gap:var(--spacing-gap-xl);opacity:0;animation:showCard var(--timing-fast) ease-out forwards;animation-delay:calc(var(--timing-regular) * 2)}@keyframes showCard{100%{opacity:1}}h1.title{font-weight:var(--font-style-semi-bold)}.intro-container{display:grid;gap:var(--spacing-gap-xl)}.date-container{display:grid;gap:var(--spacing-gap-l)}.card-package{opacity:0;transition:opacity var(--timing-fast)}.package-name{--package-name-color:var(--color-text-primary-default);color:var(--package-name-color)}.package-name a{display:flex;align-items:center;gap:var(--spacing-gap-m)}.package-name.has-link:hover{--package-name-color:var(--color-text-primary-hover)}.package-name.has-link:active{--package-name-color:var(--color-text-primary-pressed)}.package-link{display:inline-block}.licenses-names-list{display:flex;align-items:center}.licenses-names-item:not(:first-child)::before{content:"•";padding-inline:8px}.licenses-descriptions-description{white-space:break-spaces;max-block-size:940px;overflow:auto;line-height:var(--line-height-spacious)}.licenses-descriptions-item{display:grid;gap:var(--spacing-gap-xl)}.code-box{border-radius:4px;background-color:var(--color-accent-surface-surface);border:1px solid var(--color-border-surface-on-elevation-1);padding:var(--spacing-padding-xl);font-family:var(--font-family-code);font-size:var(--font-size-body-s);display:grid;gap:var(--spacing-gap-xxl)}.description-list{display:grid;gap:var(--spacing-gap-m);max-inline-size:400px;margin:0 auto}.show-more-button{justify-self:start}.color-neutral{color:var(--color-text-neutral-on-disabled)}.color-primary{color:var(--color-text-primary-default)}p{--line-height-tight:1.5;--font-weight-regular:var(\n    --font-style-regular\n  )}hr{border-block-start:0;border-color:var(--color-border-surface-on-elevation-1);inline-size:100%;margin:0}';

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

var c, d, p, g, m, h;

const u = o({
  category: "gemini-tools",
  name: "open-window",
  colorType: "primary"
});

const f = "./gx-ide-assets/details-acknowledgements/images";

const v = "300px";

const b = e(`${f}/genexus-next-logo.svg`);

const y = e(`${f}/top-start.svg`);

const x = e(`${f}/bottom-start.svg`);

const k = e(`${f}/bottom-end.svg`);

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

const $ = class {
  constructor(e) {
    a(this, e);
    c.set(this, (e => e === null || e === void 0 ? void 0 : e.toISOString().split("T")[0]));
    d.set(this, ((e, a = "name", i) => {
      const s = l(this, g, "f").call(this, i, e.name);
      const o = s === this.expandedLicenseId;
      return a === "name" ? t("ul", {
        class: "licenses-names-list"
      }, t("li", {
        class: "body-regular-m licenses-names-item"
      }, e.name)) : t("ul", {
        class: "licenses-descriptions-list"
      }, t("li", {
        class: "licenses-descriptions-item",
        key: e.name
      }, o ? t("p", {
        class: "code-box color-neutral licenses-descriptions-description scrollable"
      }, e.description) : null));
    }));
    p.set(this, ((e, a) => {
      const i = l(this, g, "f").call(this, a, e.name);
      const s = i === this.expandedLicenseId;
      const o = s ? this._componentLocale.detailsCard.hide : this._componentLocale.detailsCard.show;
      return t("div", {
        class: "licenses-buttons-container buttons-spacer"
      }, t("button", {
        class: {
          "button-icon-and-text": true,
          "button-primary": !s,
          "button-secondary": s,
          "show-more-button": true
        },
        onClick: l(this, m, "f").call(this, i)
      }, o));
    }));
    g.set(this, ((e, a) => `${e.packageName}-${e.packageVersion}-${a}`));
    m.set(this, (e => () => {
      if (e === this.expandedLicenseId) {
        // collapse
        this.expandedLicenseId = undefined;
      } else {
        // expand collapse
        this.expandedLicenseId = e;
      }
    }));
    h.set(this, (e => a => {
      if (this.openPackageUrlCallback) {
        a.preventDefault();
        this.openPackageUrlCallback(e);
      }
    }));
    this.expandedLicenseId = undefined;
    this.dateGenerated = undefined;
    this.release = undefined;
    this.packages = undefined;
    this.openPackageUrlCallback = undefined;
  }
  async componentWillLoad() {
    this._componentLocale = await r.getComponentStrings(this.el);
  }
  render() {
    var e;
    const a = l(this, c, "f").call(this, this.dateGenerated);
    return t(i, {
      class: "scrollable",
      style: {
        backgroundImage: `url(${y}), url(${x}), url(${k})`,
        backgroundPosition: "left top, left bottom, right bottom",
        backgroundRepeat: "no-repeat, no-repeat, no-repeat",
        backgroundSize: `${v}, ${v}, ${v}`
      }
    }, t("ch-theme", {
      model: w
    }), t("div", {
      class: "main-wrapper"
    }, t("div", {
      style: {
        mask: `url(${b}) no-repeat center`
      },
      class: "logo"
    }), t("div", {
      class: "card card-details elevation-1"
    }, t("div", {
      class: "intro-container"
    }, t("h1", {
      class: "title heading-3"
    }, this._componentLocale.detailsCard.title), t("p", {
      class: "body-regular-m"
    }, this._componentLocale.detailsCard.mainDescription), t("p", {
      class: "color-neutral body-italic-s"
    }, this._componentLocale.detailsCard.secondaryDescription)), t("hr", null), t("div", {
      class: "date-container"
    }, t("p", {
      class: "color-neutral"
    }, this._componentLocale.detailsCard.dateGenerated), t("time", {
      dateTime: a
    }, a))), (e = this.packages) === null || e === void 0 ? void 0 : e.map((e => {
      let a = `${e.packageName} ${e.packageVersion}`;
      const i = e.packageURL ? t("a", {
        href: e.packageURL,
        target: "_blank",
        onClick: l(this, h, "f").call(this, e.packageURL),
        class: "package-link"
      }, a, t("ch-image", {
        src: u,
        class: "package-icon icon-s"
      })) : a;
      return t("article", {
        class: "card card-package elevation-1"
      }, t("h2", {
        class: {
          "subtitle-semi-bold-s": true,
          "package-name": true,
          "has-link": !!e.packageURL
        }
      }, i), t("p", {
        class: "subtitle-semi-bold-s"
      }, this._componentLocale.packageCard.declaredLicenses), l(this, d, "f").call(this, e.declaredLicense, "name", e), l(this, d, "f").call(this, e.declaredLicense, "description", e), l(this, p, "f").call(this, e.declaredLicense, e));
    }))));
  }
  static get assetsDirs() {
    return [ "gx-ide-assets/details-acknowledgements" ];
  }
  get el() {
    return s(this);
  }
};

c = new WeakMap, d = new WeakMap, p = new WeakMap, g = new WeakMap, m = new WeakMap, 
h = new WeakMap;

$.style = n;

export { $ as gx_ide_details_acknowledgements };
//# sourceMappingURL=p-63abf7e8.entry.js.map