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

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

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

import "lit";

import "lit/directives/when.js";

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

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

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

import { r as o } from "./p-2eae8843.js";

import { C as n } from "./p-e2b6d62b.js";

import { s as c } from "./p-02fb496a.js";

import "./p-4d330836.js";

import "./p-9663f418.js";

const d = '.custom-icon-text-wrapper{display:flex;align-items:center;gap:var(--spacing-gap-m)}.warning-error-description{display:flex;align-items:center;gap:var(--spacing-gap-m);padding:var(--spacing-padding-m);max-inline-size:800px;line-height:var(--line-height-spacious)}.warning-error-icon{flex-shrink:0}button.button-secondary{border-color:var(--color-border-neutral-default)}:host{--pill-border-radius:12px;--pill-padding-inline:var(--spacing-padding-m);--pill-padding-block:var(--spacing-padding-xxs);--pill-font-size:var(--font-size-body-s);display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content max-content 1fr}.detail__current-version,.detail__knowledge-base{max-inline-size:250px;min-inline-size:180px}.detail__current-version,.detail__knowledge-base{padding-inline:var(--spacing-padding-xxl);border-inline-end:1px solid var(--color-border-surface-on-elevation-1)}.information__col-1,.detail__genexus-server{padding-inline-end:var(--spacing-padding-xxl);border-inline-end:1px solid var(--color-border-surface-on-elevation-1)}.detail__merge-from-version{padding-inline-start:var(--spacing-padding-xxl)}.section{display:contents}.header{display:grid;gap:var(--spacing-gap-xxl)}.header__detail{display:grid;grid-template-areas:"detail-title detail-title detail-title detail-title" "detail-genexus-server detail-knowledge-base detail-current-version detail-merge-from-version";row-gap:var(--spacing-gap-xl)}.detail__label{color:var(--color-text-neutral-disabled)}.detail__title{grid-area:detail-title}.detail__commit-name{grid-area:detail-commit-name}.detail__genexus-server{grid-area:detail-genexus-server}.detail__genexus-server>a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.detail__link{align-items:start;color:var(--color-text-primary-default);text-decoration:underline}.detail__link:hover{color:var(--color-text-primary-hover)}.detail__link:active{color:var(--color-text-primary-pressed)}.detail__knowledge-base{grid-area:detail-knowledge-base}.detail__current-version{grid-area:detail-current-version}.detail__merge-from-version{grid-area:detail-merge-from-version}.header__information{display:grid;row-gap:var(--spacing-gap-m);grid-template-areas:"information-title information-title" "information-col-1 information-col-2";grid-template-columns:max-content 1fr;grid-template-rows:max-content max-content}.information__title{grid-area:information-title}.information__col-1{grid-area:information-col-1;display:flex;gap:var(--spacing-gap-xxl)}.header__comments .layout__panel{justify-items:start;text-align:left}.controls-container{display:grid;margin-block-start:var(--spacing-padding-xxl)}.filter{grid-template-columns:232px 186px 1fr}.button-merge-checked{margin-inline-start:auto}.main{position:relative;display:grid;overflow:auto}.loader{position:relative;inline-size:100%;block-size:100%;inset-block-start:0}.tabular-grid{border-radius:4px;overflow:hidden}.empty-state{block-size:100%}.loader{--elevation-background-color:var(--color-accent-surface-elevation-1)}.tabular-grid.empty-result::part(main){overflow:hidden}.comments-container{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.button-tertiary.edit-range-button{padding-block:0;align-content:flex-end}.input-comments-container{position:relative}.input-comments{--control-border-color:transparent;padding-block:0 !important;padding-inline:0 !important;--line-height-tight:1.4;block-size:100%;background-color:var(--color-accent-surface-surface);transition:var(--timing-super-fast) block-size, var(--timing-super-fast) background-color, var(--timing-super-fast) padding-block, var(--timing-super-fast) padding-inline}.input-comments:focus{position:absolute;block-size:200px;inline-size:100%;z-index:99;background-color:var(--color-accent-surface-elevation-1);padding-block:var(--control-padding-block) !important;padding-inline:var(--control-padding-inline) !important}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon){background-size:contain;margin-inline-end:0;--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--enabled);cursor:pointer}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon):hover{--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--hover)}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon):active{--icon-path:var(--icon__gemini-tools_show-more-vertical_neutral--active)}.tabular-grid-row-actions::part(main),.property-grid-row-actions::part(main){gap:0 !important}.tabular-grid-row-actions>button{justify-content:start}.pill{--pill-background-color:transparent;--pill-color:transparent;--pill-border-color:transparent;background-color:var(--pill-background-color);color:var(--pill-color);border:1px solid var(--pill-border-color);inline-size:100%;padding:var(--pill-padding-block) var(--pill-padding-inline);display:flex;align-items:center;justify-content:center;border-radius:var(--pill-border-radius);position:relative}.pill--to-merge,.pill--to-revert{--pill-background-color:var(--color-accent-neutral-contrast);--pill-color:var(--color-border-primary-default);--pill-border-color:var(--color-accent-primary-pressed)}.pill--to-merge-marked{--pill-background-color:var();--pill-color:var(--color-border-primary-default);--pill-border-color:var()}.pill--pending{--pill-background-color:var(--color-accent-neutral-contrast);--pill-color:var(--color-border-primary-default);--pill-border-color:var(--color-accent-primary-pressed)}.pill--warning{--pill-background-color:var(--color-accent-warning-contrast);--pill-color:var(--color-border-warning-default);--pill-border-color:var(--color-border-warning-default)}.pill--error{--pill-background-color:var(--color-accent-error-contrast);--pill-color:var(--color-border-error-default);--pill-border-color:var(--color-border-error-light)}.pill--merged,.pill--reverted{--pill-background-color:var(--color-accent-success-contrast);--pill-color:var(--color-border-success-default);--pill-border-color:var(--color-accent-success-default)}.pill--transitioning{--pill-color:transparent}.merging-spinner-caption{display:flex;align-items:center;gap:var(--spacing-gap-m);--status-circle-color:transparent;--status-circle-size:$size;--status-circle-inset-inline-start:16px;--pill-color:var(--color-border-primary-default)}.merging-spinner-caption::before{display:inline-block;content:"";width:16px;height:16px;border:calc(16px / 7) solid var(--color-accent-primary-pressed);border-top:calc(16px / 7) solid var(--color-border-primary-on-default);border-radius:50%;animation:spin var(--timing-regular) linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.tabular-grid .button-secondary{--control-padding-block:var(--pill-padding-block);--control-padding-inline:var(--pill-padding-inline);font-size:inherit;font-weight:inherit;}.tabular-grid .tabular-grid-cell--for-pill{padding-block:0;align-items:center;justify-content:center}.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(selector-label),.tabular-grid.disabled-custom-selector .tabular-grid-column::part(bar-selector),.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(actions-icon){pointer-events:none;opacity:0.5}.tabular-grid-column--settings-custom-selector,.tabular-grid-cell--settings-custom-selector{padding:0}.tabular-grid-cell::part(actions-icon){padding-block:var(--spacing-padding-m)}ch-tabular-grid-cell.tabular-grid-cell::part(actions-icon){block-size:100%;display:block;background-size:16px;padding-inline:var(--spacing-padding-xl)}.tabular-grid-cell.no-checkbox-custom-selector::part(selector-label){visibility:hidden}.tabular-grid-row-actions::part(window){background-color:var(--color-accent-surface-elevation-2) !important}.tabular-grid-row .tabular-grid-cell:nth-child(3){min-inline-size:400px}';

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

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

var g, u, m, f, b, v, w, y, k, _, x, M, z, j, C, W, $, T, S, I;

const N = [ "resets/box-sizing", "components/tabular-grid", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar", "components/tooltip" ];

const E = "all";

const O = "detail__label body-semi-bold-s";

const R = a({
  category: "system",
  name: "add",
  colorType: "on-surface"
});

const D = a({
  category: "system",
  name: "edit",
  colorType: "on-surface"
});

const L = a({
  category: "window-tools",
  name: "filter",
  colorType: "on-surface"
});

const P = a({
  category: "system",
  name: "search",
  colorType: "on-surface"
});

const A = a({
  category: "system",
  name: "substract",
  colorType: "on-surface"
});

const F = a({
  category: "system",
  name: "warning",
  colorType: "warning"
});

const H = a({
  category: "system",
  name: "error",
  colorType: "error"
});

const X = class {
  constructor(i) {
    t(this, i);
    /**
         * The component hard-coded strings translations.
         */
    // eslint-disable-next-line @stencil-community/own-props-must-be-private
        g.set(this, void 0);
    u.set(this, void 0);
    m.set(this, void 0);
    f.set(this, []);
    b.set(this, (() => {
      if (this.commitInformation.length === 1) {
        return e("span", null, this.commitInformation[0].comment);
      }
      const t = this.commitInformation[this.commitInformation.length - 1].comment;
      return e("span", null, `${p(this, g, "f").latest}: ${t}...`);
    }));
    v.set(this, (async () => {
      this.merging = true;
      const t = new Map(this.objectsStatesMap);
      p(this, f, "f").forEach((e => {
        t.set(e, this.operationType === "revert" ? "reverting" : "merging");
      }));
      this.objectsStatesMap = t;
      await this.mergeObjectsCallback(p(this, f, "f"));
    }));
    w.set(this, (t => async () => {
      this.merging = true;
      const e = new Map(this.objectsStatesMap);
      e.set(t, this.operationType === "revert" ? "reverting" : "merging");
      this.objectsStatesMap = e;
      await this.mergeObjectsCallback([ t ]);
    }));
    y.set(this, (t => {
      let i;
      let r;
      let a;
      if (t === "Deleted") {
        i = A;
        r = p(this, g, "f").objects.actions.delete;
        a = "--color-icon-error-default";
      } else if (t === "Inserted") {
        i = R;
        r = p(this, g, "f").objects.actions.insert;
        a = "--color-icon-success-default";
      } else {
        // modified
        i = D;
        r = p(this, g, "f").objects.actions.modify;
        a = "--color-icon-warning-default";
      }
      return e("span", {
        class: "custom-icon-text-wrapper"
      }, e("ch-image", {
        type: "mask",
        class: "icon-s",
        src: i,
        style: {
          backgroundColor: `var(${a})`
        }
      }), `${r}`);
    }));
    k.set(this, ((t = false) => {
      var e, i;
      if (((e = this.commitInformation) === null || e === void 0 ? void 0 : e.length) > 1) {
        // more than one commit
        return t ? `${this.commitInformation[0].id} ... ${this.commitInformation[this.commitInformation.length - 1].id}` : `${p(this, u, "f")} ${this.commitInformation[0].id} ... ${this.commitInformation[this.commitInformation.length - 1].id}`;
      } else if (((i = this.commitInformation) === null || i === void 0 ? void 0 : i.length) === 1) {
        // just one commit
        return t ? this.commitInformation[0].id : `${p(this, u, "f")} ${this.commitInformation[0].id}`;
      } else {
        // Probably commits have not been loaded yet (loading state)
        return t ? `${p(this, g, "f").loading}` : `${p(this, u, "f")} ${p(this, g, "f").loading}`;
      }
    }));
    _.set(this, (t => {
      var e;
      const i = new Date(t);
      const r = ((e = navigator.languages) === null || e === void 0 ? void 0 : e[0]) || navigator.language;
      return `${i.toLocaleDateString(r)} ${i.toLocaleTimeString(r, {
        hour: "2-digit",
        minute: "2-digit",
        hour12: false
      })}`;
    }));
    x.set(this, ((t, i) => {
      if (t === "merging" || t === "reverting") {
        return e("span", {
          class: "merging-spinner-caption"
        }, this.operationType === "revert" ? p(this, g, "f").states.reverting : p(this, g, "f").states.merging);
      }
      const r = `pill pill--${t} body-semi-bold-s`;
      if (this.revertPillAsButton && (t === "to-merge" || t === "to-merge-marked" || t === "to-revert")) {
        return e("button", {
          class: {
            [r]: true,
            "button-secondary": true
          },
          onClick: p(this, w, "f").call(this, i)
        }, p(this, g, "f").statesForButton[t]);
      } else {
        return e("span", {
          class: r
        }, p(this, g, "f").states[t]);
      }
    }));
    M.set(this, (() => this.objectsFiltered.map((t => {
      const i = this.markedObjectsSet.has(t.id);
      const r = this.alreadyMergedObjectsIdsArray.find((e => e === t.id));
      const a = this.commitObjectsMessagesMap.get(t.id);
      const s = this.objectsStatesMap.get(t.id);
      let l;
      if (s === "error") {
        l = H;
      } else if (s === "warning") {
        l = F;
      }
      return e("ch-tabular-grid-row", {
        class: "tabular-grid-row",
        key: t.id,
        rowid: t.id,
        ref: t => i && (t === null || t === void 0 ? void 0 : t.setAttribute("marked", "true"))
      }, e("ch-tabular-grid-cell", {
        "cell-type": "rich",
        "row-selector": "true",
        class: {
          "tabular-grid-cell": true,
          "no-checkbox-custom-selector": r
        },
        size: "max-content"
      }, t.name), e("ch-tabular-grid-cell", {
        class: "tabular-grid-cell"
      }, o(t.type)), e("ch-tabular-grid-cell", {
        class: "tabular-grid-cell"
      }, t.description), e("ch-tabular-grid-cell", {
        class: "tabular-grid-cell"
      }, p(this, y, "f").call(this, t.actionTaken)), e("ch-tabular-grid-cell", {
        class: "tabular-grid-cell tabular-grid-cell--for-pill"
      }, p(this, x, "f").call(this, this.objectsStatesMap.get(t.id), t.id)), a && e("ch-tabular-grid-rowset", {
        class: "tabular-grid-rowset"
      }, e("ch-tabular-grid-rowset-empty", {
        class: {
          "tabular-grid-rowset-empty": true,
          [s]: true
        }
      }, e("p", {
        class: "warning-error-description"
      }, e("ch-image", {
        class: "icon-s warning-error-icon",
        src: l
      }), a))));
    }))));
    z.set(this, (async t => {
      t.preventDefault();
      const e = await this.tabularGridEl.getSelectedRows();
      await this.contextMenuCallback({
        selection: e,
        clientX: t.detail.clientX,
        clientY: t.detail.clientY
      });
    }));
    j.set(this, (t => {
      const e = new Set;
      const i = new Map(this.objectsStatesMap);
      const r = t.detail.rowsId;
      const a = r.filter((t => !this.alreadyMergedObjectsIdsArray.includes(t)));
      h(this, f, [ ...a ], "f");
      // Update markedObjectsSet
            p(this, f, "f").forEach((t => {
        e.add(t);
      }));
      this.markedObjectsSet = e;
      this.atLeastOneObjectIsChecked = r.length > 0;
      i.forEach((t => {
        const e = this.objectsStatesMap.get(t);
        if (e !== "to-merge" && e !== "to-merge-marked") {
          return;
        }
        const a = r.findIndex((e => e === t));
        if (a !== -1) {
          i.set(t, "to-merge-marked");
          r.splice(a, 1);
        } else {
          i.set(t, "to-merge");
        }
      }));
      this.objectsStatesMap = i;
    }));
    C.set(this, (t => {
      this.searchValue = t.detail.toLowerCase();
      p(this, $, "f").call(this);
    }));
    W.set(this, (t => {
      this.stateFilterValue = t.detail;
      p(this, $, "f").call(this);
    }));
    $.set(this, (() => {
      let t = [ ...this.commitObjects ];
      // filter by state (ch-combo-box-render) ...
            if (this.stateFilterValue !== "all") {
        t = t.filter((t => {
          const e = this.objectsStatesMap.get(t.id);
          return e === this.stateFilterValue;
        }));
      }
      // and filter by value (ch-edit) as well
            t = t.filter((t => {
        const e = t.name.toLowerCase().includes(this.searchValue);
        const i = t.type.name.toLowerCase().includes(this.searchValue);
        const r = t.description.toLowerCase().includes(this.searchValue);
        if (e || i || r) {
          return true;
        }
        return false;
      }));
      this.objectsFiltered = t;
    }));
    T.set(this, (t => {
      const e = t.detail.columnId;
      let i;
      let r = "string";
      if (e === n.type) {
        i = "name";
 // the type name
                r = "object";
      }
      this.objectsFiltered = [ ...c(t, this.objectsFiltered, r, i) ];
    }));
    S.set(this, (async () => {
      await this.viewAllCommentsCallback();
    }));
    I.set(this, (async () => {
      await this.editRangeCallback();
    }));
    this.alreadyMergedObjectsIdsArray = [];
    this.atLeastOneObjectIsChecked = false;
    this.loading = true;
    this.objectsFiltered = [];
    this.searchValue = "";
    this.stateFilterValue = E;
    this.markedObjectsSet = new Set;
    this.objectsStatesMap = new Map;
    this.commitObjectsMessagesMap = new Map;
    this.merging = false;
    this.commitDetail = undefined;
    this.commitInformation = [];
    this.commitObjects = [];
    this.hideFilters = false;
    this.operationType = "merge";
    this.mergeObjectsCallback = undefined;
    this.revertPillAsButton = false;
    this.contextMenuCallback = undefined;
    this.viewAllCommentsCallback = undefined;
    this.editRangeCallback = undefined;
  }
  objectsStatesMapChanged(t) {
    const e = [ ...t.entries() ].find((([, t]) => t === "merging" || t === "reverting"));
    if (!e) {
      this.merging = false;
    }
  }
  commitObjectsChanged(t) {
    this.loading = true;
    if (t.length) {
      // This is the first and only objects asignment
      this.loading = false;
      // All commit objects begin as "pending to merge"
            t.forEach((t => {
        this.objectsStatesMap.set(t.id, this.operationType === "revert" ? "to-revert" : "to-merge");
      }));
      this.objectsFiltered = this.commitObjects;
    }
  }
  async componentWillLoad() {
    var t;
    h(this, g, await s.getComponentStrings(this.el), "f");
    h(this, u, this.commitInformation.length > 1 ? p(this, g, "f").commmits : p(this, g, "f").commmit, "f");
    // Initiate "states" combo box filter
        h(this, m, [ {
      caption: p(this, g, "f").states.all,
      value: E
    }, {
      caption: this.operationType === "revert" ? p(this, g, "f").states["to-revert"] : p(this, g, "f").states["to-merge"],
      value: this.operationType === "revert" ? "to-revert" : "to-merge"
    }, {
      caption: p(this, g, "f").states.warning,
      value: "warning"
    }, {
      caption: p(this, g, "f").states.error,
      value: "error"
    }, {
      caption: this.operationType === "revert" ? p(this, g, "f").states.reverted : p(this, g, "f").states.merged,
      value: this.operationType === "revert" ? "reverted" : "merged"
    } ], "f");
    if ((t = this.commitObjects) === null || t === void 0 ? void 0 : t.length) {
      // if commitObjects already set...
      this.commitObjectsChanged(this.commitObjects);
    }
  }
  /**
     * It allows the host updating an object state, by providing the object id.
     * @param objectId The ID of the object to update.
     * @param newState The new state to set on the object.
     * @param message Optional message explaining the change.
     *
     * @example
     * bringChanges.updateObjectState('obj-24', "merging", null);
     * bringChanges.updateObjectState('obj-27', "error", "The server did not respond.");
     */  async updateObjectState(t, e, i) {
    // update object state
    const r = new Map(this.objectsStatesMap);
    r.set(t, e);
    this.objectsStatesMap = r;
    // add message if state is "warning" or "error"
        if ((i === null || i === void 0 ? void 0 : i.length) > 0) {
      this.commitObjectsMessagesMap.set(t, i);
    }
    if (e === "merged" || e === "reverted") {
      // remove from checked
      h(this, f, p(this, f, "f").filter((e => e !== t)), "f");
      // add to "already merged". This will hide the checkbox
            this.alreadyMergedObjectsIdsArray.push(t);
      // unmark checkbox:
            this.tabularGridEl.markRow(t, false);
      // remove message if any
            this.commitObjectsMessagesMap.delete(t);
    }
  }
  render() {
    const t = this.alreadyMergedObjectsIdsArray.length !== this.commitObjects.length;
    const r = this.merging || this.loading;
    return e(i, {
      class: "widget"
    }, e("ch-theme", {
      model: N
    }), e("section", {
      class: "section"
    }, e("header", {
      class: "header spacing-body-inline spacing-body-block-start"
    }, e("div", {
      // header details
      class: "header__detail"
    }, e("p", {
      class: "detail__title subtitle-semi-bold-s"
    }, this.operationType === "revert" ? p(this, g, "f").commitDetail.revertChangesDetail : p(this, g, "f").commitDetail.bringChangesDetail), e("div", {
      // genexus server
      class: "detail__genexus-server field field-block"
    }, e("span", {
      class: O
    }, p(this, g, "f").commitDetail.genexusServer), e("a", {
      class: "detail__link body-regular-s",
      href: this.commitDetail.genexusServer,
      target: "_blank"
    }, this.commitDetail.genexusServer)), e("div", {
      // knowledge base
      class: "detail__knowledge-base field field-block"
    }, e("span", {
      class: O
    }, p(this, g, "f").commitDetail.knowledgeBase), e("p", {
      class: "body-regular-s"
    }, this.commitDetail.knowledgeBase)), e("div", {
      // current version
      class: "detail__current-version field field-block"
    }, e("span", {
      class: O
    }, p(this, g, "f").commitDetail.currentVersion), e("a", {
      class: "body-regular-s"
    }, this.commitDetail.currentVersion)), (this.operationType === "merge" || this.operationType === "merge-all") && e("div", {
      // merge from version
      class: "detail__merge-from-version field field-block"
    }, e("span", {
      class: O
    }, p(this, g, "f").commitDetail.mergeFromVersion), e("p", {
      class: "body-regular-s"
    }, this.commitDetail.mergeFromVersion))), e("div", {
      // header information
      class: "header__information"
    }, e("p", {
      class: "information__title subtitle-semi-bold-xs"
    }, p(this, g, "f").commitInformation.title), e("div", {
      // header information (col-1)
      class: "information__col-1"
    }, e("div", {
      // IDs
      class: "field field-block"
    }, e("span", {
      class: O
    }, this.commitInformation.length === 1 ? p(this, g, "f").commitInformation.id : p(this, g, "f").commitInformation.ids), e("p", {
      class: "body-regular-s"
    }, p(this, k, "f").call(this, true))), this.commitInformation.length === 1 ? e("div", {
      class: "field field-block"
    }, e("span", {
      class: O
    }, p(this, g, "f").commitInformation.date), e("p", {
      class: "body-regular-s"
    }, p(this, _, "f").call(this, this.commitInformation[0].date))) : [ e("div", {
      class: "field field-block"
    }, e("span", {
      class: O
    }, p(this, g, "f").commitInformation.from), e("p", {
      class: "body-regular-s"
    }, p(this, _, "f").call(this, this.commitInformation[0].date))), e("div", {
      class: "field field-block"
    }, e("span", {
      class: O
    }, p(this, g, "f").commitInformation.to), e("p", {
      class: "body-regular-s"
    }, p(this, _, "f").call(this, this.commitInformation[this.commitInformation.length - 1].date))), this.operationType === "merge-all" && e("button", {
      class: "button-tertiary button-icon-and-text body-semi-bold-s edit-range-button",
      type: "button",
      onClick: p(this, I, "f")
    }, e("ch-image", {
      class: "icon-m",
      src: D,
      type: "mask"
    }), p(this, g, "f").buttons.editRange) ])), e("div", {
      class: "header__comments"
    }, e("div", {
      class: "layout layout--cols-2-1"
    }, e("div", {
      class: "layout__panel"
    }, e("div", {
      class: "field field-block"
    }, e("label", {
      class: O,
      htmlFor: "commit-comments"
    }, this.commitInformation.length > 1 ? `${p(this, g, "f").commitInformation.comments} (${this.commitInformation.length})` : p(this, g, "f").commitInformation.comment), e("p", {
      class: "body-regular-s comments-container"
    }, p(this, b, "f").call(this))), e("button", {
      class: "button-tertiary body-semi-bold-s",
      type: "button",
      onClick: p(this, S, "f")
    }, this.commitInformation.length > 1 ? p(this, g, "f").buttons.viewAllComments.replace("{{commentsCount}}", this.commitInformation.length.toString()) : p(this, g, "f").buttons.viewComment))))), e("div", {
      class: {
        "field-group": true,
        "controls-container": true,
        filter: !this.hideFilters,
        "spacing-body-inline": true
      }
    }, !this.hideFilters && [ e("ch-edit", {
      class: "input",
      disabled: r,
      startImgSrc: P,
      placeholder: p(this, g, "f").filter.searchPlaceholder,
      type: "search",
      onInput: p(this, C, "f")
    }), e("ch-combo-box-render", {
      class: "combo-box",
      disabled: r,
      model: p(this, m, "f"),
      value: this.stateFilterValue,
      onInput: p(this, W, "f"),
      placeholder: p(this, g, "f").filter.statePlaceholder
    }) ], e("button", {
      class: "button-primary button-merge-checked",
      disabled: !this.atLeastOneObjectIsChecked || r,
      onClick: p(this, v, "f")
    }, this.operationType === "revert" ? p(this, g, "f").filter.revertSelected : p(this, g, "f").filter.mergeSelected)), e("div", {
      class: "main spacing-body"
    }, this.commitObjects.length ? e("ch-tabular-grid", {
      class: {
        "tabular-grid": true,
        "objects-tabular-grid": true,
        "disabled-custom-selector": this.merging,
        "empty-result": this.objectsFiltered.length === 0
      },
      keyboardNavigationMode: "focus",
      rowSelectionMode: "multiple",
      onRowMarkingChanged: p(this, j, "f"),
      onRowContextMenu: p(this, z, "f"),
      ref: t => this.tabularGridEl = t
    }, e("ch-tabular-grid-columnset", {
      class: "tabular-grid-column-set"
    }, e("ch-tabular-grid-column", {
      class: "tabular-grid-column",
      columnId: n.name,
      columnName: p(this, g, "f").objects.name,
      columnType: "rich",
      richRowSelector: t,
      richRowSelectorMode: "mark",
      settingable: false,
      sortable: true,
      onColumnSortChanged: p(this, T, "f"),
      size: "max-content"
    }), e("ch-tabular-grid-column", {
      class: "tabular-grid-column",
      columnId: n.type,
      columnName: p(this, g, "f").objects.type,
      settingable: false,
      sortable: true,
      onColumnSortChanged: p(this, T, "f"),
      size: "max-content"
    }), e("ch-tabular-grid-column", {
      class: "tabular-grid-column",
      columnId: n.description,
      columnName: p(this, g, "f").objects.description,
      settingable: false,
      sortable: true,
      onColumnSortChanged: p(this, T, "f"),
      size: l.tabularGrid.colSize.description
    }), e("ch-tabular-grid-column", {
      class: "tabular-grid-column",
      columnId: n.action,
      columnName: p(this, g, "f").objects.action,
      settingable: false,
      sortable: false,
      size: "max-content"
    }), e("ch-tabular-grid-column", {
      // size of this column should the enough for the largest pill, and no more.
      // this prevents layout shifts when pills state changes.
      class: "tabular-grid-column",
      columnId: n.status,
      columnName: p(this, g, "f").objects.status,
      settingable: false,
      sortable: false,
      size: "100px"
    })), p(this, M, "f").call(this), e("ch-tabular-grid-rowset", {
      class: "tabular-grid-rowset"
    }, this.objectsFiltered.length === 0 && e("ch-tabular-grid-rowset-empty", null, e("gx-ide-empty-state", {
      class: "empty-state",
      isAnimated: true,
      stateIconSrc: L,
      stateTitle: "No object matched your filter"
    })))) : e("gx-ide-loader", {
      cancelLabel: p(this, g, "f").loader.cancelLabel,
      loaderTitle: p(this, g, "f").loader.title,
      description: p(this, g, "f").loader.description,
      show: true,
      class: "loader"
    }))));
  }
  static get assetsDirs() {
    return [ "gx-ide-assets/team-dev-bring-changes" ];
  }
  get el() {
    return r(this);
  }
  static get watchers() {
    return {
      objectsStatesMap: [ "objectsStatesMapChanged" ],
      commitObjects: [ "commitObjectsChanged" ]
    };
  }
};

g = new WeakMap, u = new WeakMap, m = new WeakMap, f = new WeakMap, b = new WeakMap, 
v = new WeakMap, w = new WeakMap, y = new WeakMap, k = new WeakMap, _ = new WeakMap, 
x = new WeakMap, M = new WeakMap, z = new WeakMap, j = new WeakMap, C = new WeakMap, 
W = new WeakMap, $ = new WeakMap, T = new WeakMap, S = new WeakMap, I = new WeakMap;

X.style = d;

export { X as gx_ide_team_dev_bring_changes };
//# sourceMappingURL=p-7b76b0e4.entry.js.map