import { r as registerInstance, h, H as Host, a as getElement } from './index-b153bfd0.js';
import { g as getIconPath } from './assets-manager-7d6fc08f.js';
import './mer-animated-dots-7cbae6ef.js';
import 'lit';
import 'lit/directives/when.js';
import 'lit/directives/if-defined.js';
import { F as FILTER_AFTER } from './constants-f9193da7.js';
import { c as config } from './config-5a775b7a.js';
import { f as formatDate } from './helpers-b443f9e9.js';
import { L as Locale } from './locale-e5107fad.js';

const mapOptionsToComboBoxItemModel = (options) => {
    if (!options) {
        return [];
    }
    return options.map(option => {
        var _a;
        return {
            value: option.id,
            caption: option.label,
            startImgSrc: (_a = option.iconName) !== null && _a !== void 0 ? _a : ""
        };
    });
};

const wwImagesCss = "/*@container queries*/\n/* hiChar styles\nFound on /common/helpers.tsx hiChar function is used to add a span/class to every character that matches a search value. It is used to help the user see why the filter results are filtered. The span/class on the characters are useless without proper styling.\n*/\nbutton.button-secondary {\n  border-color: var(--color-border-neutral-default);\n}\n\n:host {\n  container-type: inline-size;\n  display: grid;\n  block-size: 100%;\n  overflow: auto;\n  grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n  display: contents;\n}\n\n.header {\n  grid-template-areas: \"name module-folder\" \"advanced-filter-accordion advanced-filter-accordion\";\n  grid-template-columns: 1fr 1fr;\n  grid-auto-rows: max-content max-content;\n}\n\n.name {\n  grid-area: name;\n}\n\n.module-folder {\n  grid-area: module-folder;\n}\n\n.advanced-filter-accordion {\n  grid-area: advanced-filter-accordion;\n}\n\n.main {\n  --sidebar-width: 376px;\n  display: grid;\n  grid-template-columns: 1fr var(--sidebar-width);\n  overflow: auto;\n  padding-block-start: var(--size-16);\n}\n\n.main__grid {\n  overflow: auto;\n  position: relative;\n}\n\n.tabular-grid-ww-images {\n  overflow: auto;\n  border-inline-end: var(--section-common-border);\n}\n\nch-tabular-grid-rowset-empty {\n  position: absolute;\n  inset: 0;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  inline-size: 100%;\n  z-index: 1;\n}\n\n.main__aside {\n  overflow: auto;\n  display: grid;\n  grid-template-rows: max-content 1fr;\n}\n\n.main__filter {\n  display: grid;\n  grid-auto-rows: max-content;\n  grid-template-columns: 1fr 1fr 1fr;\n  grid-template-areas: \"category options after\" \"style language user\" \"density layer date-time\" \"search-by-contents search-by-contents button-reset\";\n  overflow: auto;\n}\n\n.category {\n  grid-area: category;\n}\n\n.options {\n  grid-area: options;\n}\n\n.after-date-time {\n  grid-area: after;\n}\n\n.user {\n  grid-area: user;\n}\n\n.date-time {\n  grid-area: date-time;\n}\n\n.style {\n  grid-area: style;\n}\n\n.language {\n  grid-area: language;\n}\n\n.density {\n  grid-area: density;\n}\n\n.layer {\n  grid-area: layer;\n}\n\n.search-by-contents {\n  grid-area: search-by-contents;\n}\n\n.button-reset {\n  grid-area: button-reset;\n  align-self: end;\n  justify-self: end;\n}\n\n.main__images-container {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  gap: var(--size-8);\n  position: relative;\n  z-index: 1;\n}\n.main__images-container .figure {\n  margin: 0;\n  background-color: var(--color-accent-surface-elevation-2);\n  display: grid;\n  grid-template-rows: minmax(0, 1fr) max-content;\n  gap: var(--size-4);\n  padding: var(--size-8);\n  border-radius: var(--size-4);\n  opacity: 0;\n  animation: fadeIn 300ms forwards;\n  aspect-ratio: 1/1;\n}\n.main__images-container .figure__picture {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  min-block-size: 0;\n}\n.main__images-container .figure__img {\n  display: block;\n  max-inline-size: 100%;\n  max-block-size: 100%;\n  inline-size: auto;\n  block-size: auto;\n  object-fit: contain;\n}\n.main__images-container .figure__figcaption {\n  text-align: center;\n  font-size: var(--font-size-body-xs);\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  inline-size: 100%;\n}\n\n.tabular-grid-ww-images ch-tabular-grid-cell:is(:nth-child(1), :nth-child(2), :nth-child(3), :nth-child(4), :nth-child(5), :nth-child(6), :nth-child(7)) {\n  align-items: start;\n  justify-content: start;\n  display: inline-block;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  min-inline-size: 0;\n}\n@keyframes fadeIn {\n  to {\n    opacity: 1;\n  }\n}\n@container (max-width: 992px) {\n  .main {\n    --sidebar-width: 288px;\n  }\n\n  .main__images-container {\n    grid-template-columns: repeat(3, 1fr);\n  }\n}\n@container (max-width: 768px) {\n  .main {\n    --sidebar-width: 200px;\n  }\n\n  .main__images-container {\n    grid-template-columns: repeat(2, 1fr);\n  }\n}\n@container (max-width: 640px) {\n  .main {\n    --sidebar-width: 112px;\n  }\n\n  .main__images-container {\n    grid-template-columns: 1fr;\n  }\n}";

var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
    if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
    if (kind === "m")
        throw new TypeError("Private method is not writable");
    if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var _GxIdeWWImages_instances, _GxIdeWWImages_componentLocale, _GxIdeWWImages_filterInitialData, _GxIdeWWImages_ACCORDION_MODEL, _GxIdeWWImages_ACCORDION_FILTER_ID, _GxIdeWWImages_imagesMap, _GxIdeWWImages_chGridEl, _GxIdeWWImages_filterModuleEl, _GxIdeWWImages_isInitialLoad, _GxIdeWWImages_deleteSelectionCallbackHandler, _GxIdeWWImages_deselectAll, _GxIdeWWImages_handleNameChange, _GxIdeWWImages_handleSearchContentsChange, _GxIdeWWImages_applyDefaultCategory, _GxIdeWWImages_handleCategoryChange, _GxIdeWWImages_handleAllDescendantsChange, _GxIdeWWImages_handleAfterTypeChange, _GxIdeWWImages_handleUserChange, _GxIdeWWImages_handleModifiedDateChange, _GxIdeWWImages_handleStyleChange, _GxIdeWWImages_handleLanguageChange, _GxIdeWWImages_handleDensityChange, _GxIdeWWImages_handleLayerChange, _GxIdeWWImages_handleModuleChange, _GxIdeWWImages_filterImagesInformationHandler, _GxIdeWWImages_getImages, _GxIdeWWImages_getToday, _GxIdeWWImages_addEventListeners, _GxIdeWWImages_getImageValue, _GxIdeWWImages_sortImages, _GxIdeWWImages_handleColumnSortChanged, _GxIdeWWImages_newObjectCallbackHandler, _GxIdeWWImages_openSelectionCallBackHandler, _GxIdeWWImages_toggleModifiedControls, _GxIdeWWImages_renderHeader, _GxIdeWWImages_renderFilter, _GxIdeWWImages_renderImages, _GxIdeWWImages_renderTabularGrid, _GxIdeWWImages_resetFilterHandler, _GxIdeWWImages_saveInitialFilterData, _GxIdeWWImages_selectAll;
const CSS_BUNDLES = [
    "resets/box-sizing",
    "components/accordion",
    "components/button",
    "components/checkbox",
    "components/combo-box",
    "components/edit",
    "components/icon",
    "components/tabular-grid",
    "components/sidebar",
    "utils/form",
    "utils/layout",
    "utils/typography",
    "utils/spacing",
    "chameleon/scrollbar"
];
const ALL_DESCENDANTS_VALUE = "all-descendants";
const MODIFIED_VALUE = "modified";
let TODAY = null;
// icons
const RESET_ICON = getIconPath({
    category: "gemini-tools",
    name: "reset",
    colorType: "interactive"
});
const SEARCH_ICON = getIconPath({
    category: "gemini-tools",
    name: "search",
    colorType: "neutral"
});
const NOTICE_ICON = getIconPath({
    category: "gemini-tools",
    name: "notice",
    colorType: "on-elevation"
});
const GxIdeWWImages = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        _GxIdeWWImages_instances.add(this);
        /**
         * The component hard-coded strings translations.
         */
        _GxIdeWWImages_componentLocale.set(this, void 0);
        _GxIdeWWImages_filterInitialData.set(this, void 0);
        _GxIdeWWImages_ACCORDION_MODEL.set(this, []);
        _GxIdeWWImages_ACCORDION_FILTER_ID.set(this, "advanced-filter");
        _GxIdeWWImages_imagesMap.set(this, new Map());
        _GxIdeWWImages_chGridEl.set(this, void 0);
        // Only keep refs that are actually needed for operations (event listeners)
        _GxIdeWWImages_filterModuleEl.set(this, void 0);
        /**
         * Flag to prevent triggering #getImages on initial load
         */
        _GxIdeWWImages_isInitialLoad.set(this, true);
        _GxIdeWWImages_deleteSelectionCallbackHandler.set(this, () => {
            this.deleteSelectionCallback(this.selectedObjectsIds);
        });
        _GxIdeWWImages_deselectAll.set(this, () => {
            __classPrivateFieldGet(this, _GxIdeWWImages_chGridEl, "f").selectAllRows(false);
        });
        /**
         * Individual handler functions for each filter control
         */
        _GxIdeWWImages_handleNameChange.set(this, (event) => {
            this.filterNameValue = (event.detail ||
                event.target.value);
        });
        _GxIdeWWImages_handleSearchContentsChange.set(this, (event) => {
            this.filterSearchContentsValue = (event.detail ||
                event.target.value);
        });
        _GxIdeWWImages_applyDefaultCategory.set(this, () => {
            if (this.defaultCategory && this.categoriesComboBoxModel.length > 0) {
                const categoryExists = this.categoriesComboBoxModel.some(item => item.value === this.defaultCategory);
                if (categoryExists) {
                    this.filterCategoryValue = this.defaultCategory;
                }
            }
        });
        _GxIdeWWImages_handleCategoryChange.set(this, (event) => {
            this.filterCategoryValue = event.detail;
        });
        _GxIdeWWImages_handleAllDescendantsChange.set(this, (event) => {
            this.filterAllDescendantsValue = event.detail === ALL_DESCENDANTS_VALUE;
        });
        _GxIdeWWImages_handleAfterTypeChange.set(this, (event) => {
            this.filterAfterTypeValue = event.detail;
            this.afterCurrentValue = event.detail;
        });
        _GxIdeWWImages_handleUserChange.set(this, (event) => {
            this.filterUserValue = (event.detail ||
                event.target.value);
        });
        _GxIdeWWImages_handleModifiedDateChange.set(this, (event) => {
            this.filterModifiedDateValue = event.target.value;
        });
        _GxIdeWWImages_handleStyleChange.set(this, (event) => {
            this.filterStyleValue = event.detail;
        });
        _GxIdeWWImages_handleLanguageChange.set(this, (event) => {
            this.filterLanguageValue = event.detail;
        });
        _GxIdeWWImages_handleDensityChange.set(this, (event) => {
            this.filterDensityValue = event.detail;
        });
        _GxIdeWWImages_handleLayerChange.set(this, (event) => {
            this.filterLayerValue = event.detail;
        });
        _GxIdeWWImages_handleModuleChange.set(this, () => {
            // Module change is handled via event listener, but we update state
            if (__classPrivateFieldGet(this, _GxIdeWWImages_filterModuleEl, "f")) {
                this.filterModuleValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterModuleEl, "f").value;
            }
        });
        _GxIdeWWImages_filterImagesInformationHandler.set(this, () => {
            // Copy images from server to tabularGridData (will be sorted before rendering)
            this.tabularGridData = [...this.images];
        });
        _GxIdeWWImages_getImages.set(this, () => {
            __classPrivateFieldGet(this, _GxIdeWWImages_imagesMap, "f").clear();
            const filters = {
                name: this.filterNameValue,
                searchContents: this.filterSearchContentsValue,
                category: this.filterCategoryValue,
                parent: this.filterModuleValue ? this.filterModuleValue.id : null,
                allDescendants: this.filterAllDescendantsValue,
                modifiedAfter: this.filterAfterTypeValue,
                modifiedBy: this.filterUserValue,
                modifiedDate: this.filterModifiedDateValue
                    ? new Date(this.filterModifiedDateValue)
                    : undefined,
                style: this.filterStyleValue,
                language: this.filterLanguageValue,
                density: this.filterDensityValue,
                layer: this.filterLayerValue
            };
            this.loadCallback(filters).then((items) => {
                this.images = items;
                this.selectedObjectsIds = [];
                __classPrivateFieldGet(this, _GxIdeWWImages_deselectAll, "f").call(this);
                __classPrivateFieldGet(this, _GxIdeWWImages_filterImagesInformationHandler, "f").call(this);
            });
        });
        _GxIdeWWImages_getToday.set(this, () => {
            const now = new Date();
            const date = now.toISOString().split("T")[0];
            const time = now.toISOString().split("T")[1].slice(0, 5); // Only take 'HH:MM' part
            return `${date}T${time}`;
        });
        _GxIdeWWImages_addEventListeners.set(this, () => {
            /* module/folder */
            __classPrivateFieldGet(this, _GxIdeWWImages_filterModuleEl, "f").addEventListener("valueChanged", () => {
                __classPrivateFieldGet(this, _GxIdeWWImages_handleModuleChange, "f").call(this);
            });
            // for grid selection
            __classPrivateFieldGet(this, _GxIdeWWImages_chGridEl, "f").addEventListener("selectionChanged", (ev) => {
                this.selectedObjectsIds = ev.detail.rowsId;
                this.selectionObjectChangedCallback(this.selectedObjectsIds);
                if (this.selectedObjectsIds.length === 0) {
                    this.imagesSelectedItems = [];
                    return;
                }
                // Collect cached items immediately
                const cachedItems = [];
                const idsToLoad = [];
                this.selectedObjectsIds.forEach((selectedId) => {
                    if (__classPrivateFieldGet(this, _GxIdeWWImages_imagesMap, "f").has(selectedId)) {
                        const items = __classPrivateFieldGet(this, _GxIdeWWImages_imagesMap, "f").get(selectedId);
                        if (items) {
                            cachedItems.push(...items);
                        }
                    }
                    else {
                        idsToLoad.push(selectedId);
                    }
                });
                // If all items were cached, update immediately
                if (idsToLoad.length === 0) {
                    this.imagesSelectedItems = cachedItems;
                    return;
                }
                // Store current selection to verify later (prevents race conditions)
                const currentSelection = [...this.selectedObjectsIds].sort().join(",");
                // Load missing items and combine with cached ones
                // loadImageItemsCallback must be invoked the first time a user selects an image
                const loadPromises = idsToLoad.map((selectedId) => this.loadImageItemsCallback(selectedId).then((items) => {
                    // Cache the items for future use
                    __classPrivateFieldGet(this, _GxIdeWWImages_imagesMap, "f").set(selectedId, items);
                    return items;
                }));
                Promise.all(loadPromises).then((loadedItemsArrays) => {
                    // Verify that selection hasn't changed while loading
                    const currentSelectionAfterLoad = [...this.selectedObjectsIds]
                        .sort()
                        .join(",");
                    if (currentSelection !== currentSelectionAfterLoad) {
                        // Selection changed, ignore this result
                        return;
                    }
                    // Combine cached items with newly loaded items
                    const allImageItems = [...cachedItems];
                    loadedItemsArrays.forEach(items => {
                        allImageItems.push(...items);
                    });
                    this.imagesSelectedItems = allImageItems;
                });
            });
            __classPrivateFieldGet(this, _GxIdeWWImages_chGridEl, "f").addEventListener("rowDoubleClicked", () => {
                __classPrivateFieldGet(this, _GxIdeWWImages_openSelectionCallBackHandler, "f").call(this);
            });
            __classPrivateFieldGet(this, _GxIdeWWImages_chGridEl, "f").addEventListener("rowContextMenu", (ev) => {
                ev.preventDefault();
                ev.stopPropagation();
                this.contextMenuCallback({
                    selection: ev.detail.selectedRowsId,
                    clientX: ev.detail.clientX,
                    clientY: ev.detail.clientY
                });
            });
        });
        /**
         * Sorts images based on the current order criteria
         */
        _GxIdeWWImages_sortImages.set(this, (a, b) => {
            if (this.order.orderCriteria) {
                const valueA = __classPrivateFieldGet(this, _GxIdeWWImages_instances, "m", _GxIdeWWImages_getImageValue).call(this, a, this.order.orderCriteria).toUpperCase();
                const valueB = __classPrivateFieldGet(this, _GxIdeWWImages_instances, "m", _GxIdeWWImages_getImageValue).call(this, b, this.order.orderCriteria).toUpperCase();
                if (valueA < valueB) {
                    return this.order.ascending ? -1 : 1;
                }
                if (valueA > valueB) {
                    return this.order.ascending ? 1 : -1;
                }
            }
            return 0;
        });
        /**
         * Handles column sort changes
         */
        _GxIdeWWImages_handleColumnSortChanged.set(this, (e) => {
            const { columnId, sortDirection } = e.detail;
            this.order = {
                orderCriteria: columnId,
                ascending: sortDirection === "asc"
            };
        });
        _GxIdeWWImages_newObjectCallbackHandler.set(this, () => {
            this.newObjectCallback();
        });
        _GxIdeWWImages_openSelectionCallBackHandler.set(this, () => {
            this.openSelectionCallback(this.selectedObjectsIds);
        });
        _GxIdeWWImages_toggleModifiedControls.set(this, (event) => {
            this.enabledModifiedControls = event.detail === MODIFIED_VALUE;
        });
        _GxIdeWWImages_renderHeader.set(this, () => {
            return [
                h("div", {
                    // name
                    class: "field field-block name"
                }, h("label", { class: "label", htmlFor: "filter-name" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.name), h("ch-edit", { id: "filter-name", class: "input", autoFocus: true, value: this.filterNameValue, debounce: config.inputDebounce, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleNameChange, "f") })),
                h("div", { class: "field field-block module-folder" }, h("label", { class: "label", htmlFor: "module-folder" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.moduleFolder), h("gx-ide-entity-selector", {
                    // module/folder
                    id: "module/folder", labelPosition: "none", value: this.filterModuleValue, defaultValue: this.defaultModule, selectEntityCallback: this.selectModuleCallback, ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWImages_filterModuleEl, el, "f"))
                })),
                h("ch-accordion-render", {
                    // modified
                    class: "accordion-outlined advanced-filter-accordion", model: __classPrivateFieldGet(this, _GxIdeWWImages_ACCORDION_MODEL, "f")
                }, h("div", { slot: __classPrivateFieldGet(this, _GxIdeWWImages_ACCORDION_FILTER_ID, "f"), class: "spacing-body" }, h("div", { class: "main__filter field-group scrollable" }, h("div", {
                    // category
                    class: "field field-block category"
                }, h("label", { class: "label", htmlFor: "filter-category" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.category), h("ch-combo-box-render", { id: "filter-category", class: "combo-box", value: this.filterCategoryValue, disabled: !this.categories, model: this.categoriesComboBoxModel, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleCategoryChange, "f") })), h("div", {
                    // category
                    class: "field-group options"
                }, h("label", { class: "label", htmlFor: "filter-category" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.options), h("div", {
                    // options
                    class: "field field-inline"
                }, h("ch-checkbox", { class: "checkbox all-descendants", caption: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.allDescendants, checkedValue: ALL_DESCENDANTS_VALUE, value: this.filterAllDescendantsValue
                        ? ALL_DESCENDANTS_VALUE
                        : undefined, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleAllDescendantsChange, "f") }), h("ch-checkbox", { class: "checkbox modified", caption: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.modified, checkedValue: MODIFIED_VALUE, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_toggleModifiedControls, "f") }))), h("div", {
                    // after
                    class: "field field-block after-date-time"
                }, h("label", { class: {
                        "label": true,
                        "label--disabled": !this.enabledModifiedControls
                    }, htmlFor: "filter-after-type" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.afterLabel), h("ch-combo-box-render", { id: "filter-after-type", class: "combo-box", value: this.filterAfterTypeValue, disabled: !this.enabledModifiedControls, model: this.filterAfterOptions, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleAfterTypeChange, "f") })), h("div", {
                    // user
                    class: "field field-block user"
                }, h("label", { class: {
                        "label": true,
                        "label--disabled": !this.enabledModifiedControls
                    }, htmlFor: "filter-user" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.user), h("ch-edit", { id: "filter-user", value: this.filterUserValue, class: "input", disabled: !this.enabledModifiedControls, debounce: config.inputDebounce, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleUserChange, "f") })), h("div", {
                    // date/time
                    class: "field field-block date-time"
                }, h("label", { class: {
                        "label": true,
                        "label--disabled": this.afterCurrentValue !== FILTER_AFTER.DATE_TIME
                    }, htmlFor: "modified-date" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.dateTime), h("input", { type: "datetime-local", class: "input ", id: "modified-date", name: "modifiedDate", value: this.filterModifiedDateValue, max: TODAY, disabled: this.afterCurrentValue !== FILTER_AFTER.DATE_TIME, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleModifiedDateChange, "f") })), h("div", {
                    // style
                    class: "field field-block style"
                }, h("label", { class: "label", htmlFor: "filter-style" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.style), h("ch-combo-box-render", { id: "filter-style", class: "combo-box", value: this.filterStyleValue, disabled: !this.styles, model: this.stylesComboBoxModel, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleStyleChange, "f") })), h("div", {
                    // language
                    class: "field field-block language"
                }, h("label", { class: "label", htmlFor: "filter-language" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.language), h("ch-combo-box-render", { id: "filter-language", class: "combo-box", value: this.filterLanguageValue, disabled: !this.languages, model: this.languagesComboBoxModel, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleLanguageChange, "f") })), h("div", {
                    // density
                    class: "field field-block"
                }, h("label", { class: "label", htmlFor: "filter-density" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.density), h("ch-combo-box-render", { id: "filter-density", class: "combo-box", value: this.filterDensityValue, disabled: !this.densities, model: this.densitiesComboBoxModel, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleDensityChange, "f") })), h("div", {
                    // layer
                    class: "field field-block"
                }, h("label", { class: "label", htmlFor: "filter-layer" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.layer), h("ch-combo-box-render", { id: "filter-layer", class: "combo-box", value: this.filterLayerValue, disabled: !this.layers, model: this.layersComboBoxModel, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleLayerChange, "f") })), h("div", {
                    // search contents
                    class: "field field-block search-by-contents"
                }, h("label", { class: "label", htmlFor: "search-input" }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.search), h("ch-edit", { id: "search-input", debounce: config.inputDebounce, class: "input", value: this.filterSearchContentsValue, placeholder: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.searchContentsPlaceholder, onInput: __classPrivateFieldGet(this, _GxIdeWWImages_handleSearchContentsChange, "f"), startImgSrc: SEARCH_ICON, type: "search" })), h("button", {
                    // reset filter button
                    class: "button-secondary button-icon-and-text button-reset", onClick: __classPrivateFieldGet(this, _GxIdeWWImages_resetFilterHandler, "f")
                }, h("ch-image", { class: "icon-sm", src: RESET_ICON, type: "mask" }), __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.resetFilters))))
            ];
        });
        _GxIdeWWImages_renderFilter.set(this, () => {
            return (h("div", { class: "sidebar-container scrollable" }, __classPrivateFieldGet(this, _GxIdeWWImages_renderImages, "f").call(this)));
        });
        _GxIdeWWImages_renderImages.set(this, () => {
            return (
            /* tiles */
            h("div", { class: "main__images-container spacing-body-inline" }, this.imagesSelectedItems.map(item => (h("figure", { class: "figure" }, h("picture", { class: "figure__picture" }, h("img", { class: "figure__img", src: item.url, alt: item.name })), h("figcaption", { class: "figure__figcaption" }, item.name))))));
        });
        _GxIdeWWImages_renderTabularGrid.set(this, () => {
            const commonColSize = "minmax(max-content, auto)";
            return (h("div", { class: {
                    "field-group": true,
                    "main__grid": true
                } }, h("ch-tabular-grid", { ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWImages_chGridEl, el, "f")), rowSelectionMode: "multiple", class: "tabular-grid tabular-grid-ww-images", columnResizeMode: "splitter" }, h("ch-tabular-grid-columnset", { class: "tabular-grid-column-set" }, h("ch-tabular-grid-column", { columnId: "icon", columnName: "", settingable: false, size: config.tabularGrid.colSize.maxContent, class: "tabular-grid-column", resizable: true, sortable: false }), h("ch-tabular-grid-column", { columnId: "name", columnName: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").tableHead.name, settingable: false, class: "tabular-grid-column", "column-name-position": "text", size: commonColSize, resizable: true, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeWWImages_handleColumnSortChanged, "f") }), h("ch-tabular-grid-column", { columnId: "module", columnName: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").tableHead.module, settingable: false, size: commonColSize, class: "tabular-grid-column", resizable: true, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeWWImages_handleColumnSortChanged, "f") }), h("ch-tabular-grid-column", { columnId: "description", columnName: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").tableHead.description, settingable: false, size: "minmax(300px, 1fr)", class: "tabular-grid-column", resizable: false, sortable: false }), h("ch-tabular-grid-column", { columnId: "modifiedDate", columnName: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").tableHead.modifiedDate, settingable: false, size: commonColSize, class: "tabular-grid-column", resizable: true, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeWWImages_handleColumnSortChanged, "f") }), h("ch-tabular-grid-column", { columnId: "lastUser", columnName: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").tableHead.lastUser, settingable: false, size: commonColSize, class: "tabular-grid-column", resizable: true, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeWWImages_handleColumnSortChanged, "f") }), h("ch-tabular-grid-column", { columnId: "importDate", columnName: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").tableHead.importDate, settingable: false, size: commonColSize, class: "tabular-grid-column", resizable: true, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeWWImages_handleColumnSortChanged, "f") })), this.tabularGridData.length ? (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, [...this.tabularGridData]
                .sort(__classPrivateFieldGet(this, _GxIdeWWImages_sortImages, "f"))
                .map((obj) => (h("ch-tabular-grid-row", { rowid: obj.id, class: "tabular-grid-row" }, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-image", { src: obj.icon })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, obj.name), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, obj.module), h("ch-tabular-grid-cell", { class: "tabular-grid-cell tabular-grid-cell-description" }, obj.description), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, formatDate(obj.modifiedDate)), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, obj.lastUser), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, formatDate(obj.importDate))))))) : (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, h("ch-tabular-grid-rowset-empty", null, h("gx-ide-empty-state", { isAnimated: false, stateIconSrc: NOTICE_ICON, stateTitle: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").emptyState.title, key: "no-images-empty-state" })))))));
        });
        _GxIdeWWImages_resetFilterHandler.set(this, () => {
            if (__classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f")) {
                this.filterNameValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").name;
                this.filterModuleValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").module;
                this.filterSearchContentsValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").searchContents;
                this.filterCategoryValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").category;
                this.filterAllDescendantsValue =
                    __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").allDescendants === ALL_DESCENDANTS_VALUE;
                this.filterAfterTypeValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").modifiedAfter;
                this.filterModifiedDateValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").modifiedDateTime;
                this.filterUserValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").modifiedUser;
                this.filterStyleValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").style;
                this.filterLanguageValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").language;
                this.filterDensityValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").density;
                this.filterLayerValue = __classPrivateFieldGet(this, _GxIdeWWImages_filterInitialData, "f").layer;
                this.afterCurrentValue = this.filterAfterTypeValue;
            }
        });
        _GxIdeWWImages_saveInitialFilterData.set(this, () => {
            __classPrivateFieldSet(this, _GxIdeWWImages_filterInitialData, {
                name: this.filterNameValue,
                module: this.filterModuleValue,
                searchContents: this.filterSearchContentsValue,
                category: this.filterCategoryValue,
                allDescendants: this.filterAllDescendantsValue
                    ? ALL_DESCENDANTS_VALUE
                    : "",
                modifiedAfter: this.filterAfterTypeValue,
                modifiedDateTime: this.filterModifiedDateValue,
                modifiedUser: this.filterUserValue,
                style: this.filterStyleValue,
                language: this.filterLanguageValue,
                density: this.filterDensityValue,
                layer: this.filterLayerValue
            }, "f");
        });
        _GxIdeWWImages_selectAll.set(this, () => {
            __classPrivateFieldGet(this, _GxIdeWWImages_chGridEl, "f").selectAllRows();
        });
        this.categoriesComboBoxModel = [];
        this.densitiesComboBoxModel = [];
        this.languagesComboBoxModel = [];
        this.layersComboBoxModel = [];
        this.stylesComboBoxModel = [];
        this.afterCurrentValue = undefined;
        this.filterAfterOptions = undefined;
        this.tabularGridData = [];
        this.images = [];
        this.imagesSelectedItems = [];
        this.selectedObjectsIds = [];
        this.enabledModifiedControls = false;
        this.order = {
            orderCriteria: null,
            ascending: null
        };
        this.filterNameValue = "";
        this.filterSearchContentsValue = "";
        this.filterCategoryValue = undefined;
        this.filterAllDescendantsValue = false;
        this.filterAfterTypeValue = undefined;
        this.filterUserValue = "";
        this.filterModifiedDateValue = "";
        this.filterStyleValue = undefined;
        this.filterLanguageValue = undefined;
        this.filterDensityValue = undefined;
        this.filterLayerValue = undefined;
        this.filterModuleValue = undefined;
        this.categories = undefined;
        this.contextMenuCallback = undefined;
        this.defaultCategory = undefined;
        this.defaultModule = undefined;
        this.deleteSelectionCallback = undefined;
        this.densities = undefined;
        this.languages = undefined;
        this.layers = undefined;
        this.loadCallback = undefined;
        this.loadImageItemsCallback = undefined;
        this.newObjectCallback = undefined;
        this.openSelectionCallback = undefined;
        this.selectModuleCallback = undefined;
        this.selectionObjectChangedCallback = undefined;
        this.styles = undefined;
    }
    categoriesChanged(newCategories) {
        this.categoriesComboBoxModel = mapOptionsToComboBoxItemModel(newCategories);
        __classPrivateFieldGet(this, _GxIdeWWImages_applyDefaultCategory, "f").call(this);
    }
    defaultCategoryChanged() {
        __classPrivateFieldGet(this, _GxIdeWWImages_applyDefaultCategory, "f").call(this);
    }
    densitiesChanged(newDensities) {
        this.densitiesComboBoxModel = mapOptionsToComboBoxItemModel(newDensities);
    }
    languagesChanged(newLanguages) {
        this.languagesComboBoxModel = mapOptionsToComboBoxItemModel(newLanguages);
    }
    layersChanged(newLayers) {
        this.layersComboBoxModel = mapOptionsToComboBoxItemModel(newLayers);
    }
    stylesChanged(newStyles) {
        this.stylesComboBoxModel = mapOptionsToComboBoxItemModel(newStyles);
    }
    async connectedCallback() {
        TODAY = __classPrivateFieldGet(this, _GxIdeWWImages_getToday, "f").call(this);
    }
    componentDidLoad() {
        __classPrivateFieldGet(this, _GxIdeWWImages_addEventListeners, "f").call(this);
        __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        __classPrivateFieldGet(this, _GxIdeWWImages_saveInitialFilterData, "f").call(this);
        __classPrivateFieldSet(this, _GxIdeWWImages_isInitialLoad, false, "f");
    }
    async componentWillLoad() {
        __classPrivateFieldSet(this, _GxIdeWWImages_componentLocale, await Locale.getComponentStrings(this.el), "f");
        // initialize combo-box models
        this.categoriesChanged(this.categories);
        this.densitiesChanged(this.densities);
        this.languagesChanged(this.languages);
        this.layersChanged(this.layers);
        this.stylesChanged(this.styles);
        // initialize "After" combo-box options
        this.filterAfterOptions = [
            {
                caption: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.afterNone,
                value: FILTER_AFTER.NONE
            },
            {
                caption: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter[FILTER_AFTER.DATE_TIME],
                value: FILTER_AFTER.DATE_TIME
            },
            {
                caption: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter[FILTER_AFTER.IMPORT],
                value: FILTER_AFTER.IMPORT
            },
            {
                caption: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter[FILTER_AFTER.LAST_BUILD],
                value: FILTER_AFTER.LAST_BUILD
            }
        ];
        this.afterCurrentValue = this.filterAfterOptions[0].value;
        this.filterAfterTypeValue = this.filterAfterOptions[0].value;
        // Initialize filter state values
        __classPrivateFieldGet(this, _GxIdeWWImages_applyDefaultCategory, "f").call(this);
        this.filterModuleValue = this.defaultModule;
        if (this.stylesComboBoxModel.length > 0) {
            this.filterStyleValue = this.stylesComboBoxModel[0].value;
        }
        if (this.languagesComboBoxModel.length > 0) {
            this.filterLanguageValue = this.languagesComboBoxModel[0].value;
        }
        if (this.densitiesComboBoxModel.length > 0) {
            this.filterDensityValue = this.densitiesComboBoxModel[0].value;
        }
        if (this.layersComboBoxModel.length > 0) {
            this.filterLayerValue = this.layersComboBoxModel[0].value;
        }
        __classPrivateFieldSet(this, _GxIdeWWImages_ACCORDION_MODEL, [
            {
                id: __classPrivateFieldGet(this, _GxIdeWWImages_ACCORDION_FILTER_ID, "f"),
                caption: __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").filter.accordionCaption,
                expanded: false
            }
        ], "f");
    }
    keyDownHandler(eventInfo) {
        if (document.activeElement === this.el) {
            switch (eventInfo.key) {
                case "Enter":
                    __classPrivateFieldGet(this, _GxIdeWWImages_openSelectionCallBackHandler, "f").call(this);
                    break;
                case "Delete":
                    __classPrivateFieldGet(this, _GxIdeWWImages_deleteSelectionCallbackHandler, "f").call(this);
                    break;
            }
        }
    }
    /**
     * Reloads the view, refreshing the filters and the images table.
     */
    async reload() {
        __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
    }
    /**
     * Watch filter state variables and trigger #getImages when they change
     */
    filterNameValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterSearchContentsValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterCategoryValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterAllDescendantsValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterAfterTypeValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterUserValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterModifiedDateValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterStyleValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterLanguageValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterDensityValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterLayerValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    filterModuleValueChanged() {
        if (!__classPrivateFieldGet(this, _GxIdeWWImages_isInitialLoad, "f")) {
            __classPrivateFieldGet(this, _GxIdeWWImages_getImages, "f").call(this);
        }
    }
    render() {
        return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, h("header", { class: "header control-header-with-border spacing-body-inline spacing-body-block-start field-group" }, __classPrivateFieldGet(this, _GxIdeWWImages_renderHeader, "f").call(this)), h("div", { class: "main" }, __classPrivateFieldGet(this, _GxIdeWWImages_renderTabularGrid, "f").call(this), h("div", { class: "main__aside field-group" }, __classPrivateFieldGet(this, _GxIdeWWImages_renderFilter, "f").call(this))), h("footer", { class: "dialog-footer-with-border dialog-footer-space-between spacing-body" }, h("p", {
            // matching objects
            class: "text-body"
        }, `${this.tabularGridData.length} ${__classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").objCount.matching}`), h("div", { class: "buttons-spacer" }, h("button", {
            // select all button
            id: "button-select-all", class: "button-secondary", onClick: __classPrivateFieldGet(this, _GxIdeWWImages_selectAll, "f")
        }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").footer.btnSelectAll), h("button", {
            // new image button
            id: "button-new-file", class: "button-primary button-icon-and-text", onClick: __classPrivateFieldGet(this, _GxIdeWWImages_newObjectCallbackHandler, "f")
        }, __classPrivateFieldGet(this, _GxIdeWWImages_componentLocale, "f").footer.btnNew))))));
    }
    static get assetsDirs() { return ["gx-ide-assets/ww-images"]; }
    get el() { return getElement(this); }
    static get watchers() { return {
        "categories": ["categoriesChanged"],
        "defaultCategory": ["defaultCategoryChanged"],
        "densities": ["densitiesChanged"],
        "languages": ["languagesChanged"],
        "layers": ["layersChanged"],
        "styles": ["stylesChanged"],
        "filterNameValue": ["filterNameValueChanged"],
        "filterSearchContentsValue": ["filterSearchContentsValueChanged"],
        "filterCategoryValue": ["filterCategoryValueChanged"],
        "filterAllDescendantsValue": ["filterAllDescendantsValueChanged"],
        "filterAfterTypeValue": ["filterAfterTypeValueChanged"],
        "filterUserValue": ["filterUserValueChanged"],
        "filterModifiedDateValue": ["filterModifiedDateValueChanged"],
        "filterStyleValue": ["filterStyleValueChanged"],
        "filterLanguageValue": ["filterLanguageValueChanged"],
        "filterDensityValue": ["filterDensityValueChanged"],
        "filterLayerValue": ["filterLayerValueChanged"],
        "filterModuleValue": ["filterModuleValueChanged"]
    }; }
};
_GxIdeWWImages_componentLocale = new WeakMap(), _GxIdeWWImages_filterInitialData = new WeakMap(), _GxIdeWWImages_ACCORDION_MODEL = new WeakMap(), _GxIdeWWImages_ACCORDION_FILTER_ID = new WeakMap(), _GxIdeWWImages_imagesMap = new WeakMap(), _GxIdeWWImages_chGridEl = new WeakMap(), _GxIdeWWImages_filterModuleEl = new WeakMap(), _GxIdeWWImages_isInitialLoad = new WeakMap(), _GxIdeWWImages_deleteSelectionCallbackHandler = new WeakMap(), _GxIdeWWImages_deselectAll = new WeakMap(), _GxIdeWWImages_handleNameChange = new WeakMap(), _GxIdeWWImages_handleSearchContentsChange = new WeakMap(), _GxIdeWWImages_applyDefaultCategory = new WeakMap(), _GxIdeWWImages_handleCategoryChange = new WeakMap(), _GxIdeWWImages_handleAllDescendantsChange = new WeakMap(), _GxIdeWWImages_handleAfterTypeChange = new WeakMap(), _GxIdeWWImages_handleUserChange = new WeakMap(), _GxIdeWWImages_handleModifiedDateChange = new WeakMap(), _GxIdeWWImages_handleStyleChange = new WeakMap(), _GxIdeWWImages_handleLanguageChange = new WeakMap(), _GxIdeWWImages_handleDensityChange = new WeakMap(), _GxIdeWWImages_handleLayerChange = new WeakMap(), _GxIdeWWImages_handleModuleChange = new WeakMap(), _GxIdeWWImages_filterImagesInformationHandler = new WeakMap(), _GxIdeWWImages_getImages = new WeakMap(), _GxIdeWWImages_getToday = new WeakMap(), _GxIdeWWImages_addEventListeners = new WeakMap(), _GxIdeWWImages_sortImages = new WeakMap(), _GxIdeWWImages_handleColumnSortChanged = new WeakMap(), _GxIdeWWImages_newObjectCallbackHandler = new WeakMap(), _GxIdeWWImages_openSelectionCallBackHandler = new WeakMap(), _GxIdeWWImages_toggleModifiedControls = new WeakMap(), _GxIdeWWImages_renderHeader = new WeakMap(), _GxIdeWWImages_renderFilter = new WeakMap(), _GxIdeWWImages_renderImages = new WeakMap(), _GxIdeWWImages_renderTabularGrid = new WeakMap(), _GxIdeWWImages_resetFilterHandler = new WeakMap(), _GxIdeWWImages_saveInitialFilterData = new WeakMap(), _GxIdeWWImages_selectAll = new WeakMap(), _GxIdeWWImages_instances = new WeakSet(), _GxIdeWWImages_getImageValue = function _GxIdeWWImages_getImageValue(image, key) {
    var _a;
    switch (key) {
        case "name":
            return image.name || "";
        case "module":
            return image.module || "";
        case "description":
            return image.description || "";
        case "modifiedDate":
            return image.modifiedDate
                ? formatDate(image.modifiedDate).toLowerCase()
                : "";
        case "lastUser":
            return ((_a = image.lastUser) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || "";
        case "importDate":
            return image.importDate
                ? formatDate(image.importDate).toLowerCase()
                : "";
        default:
            return "";
    }
};
GxIdeWWImages.style = wwImagesCss;

export { GxIdeWWImages as gx_ide_ww_images };

//# sourceMappingURL=gx-ide-ww-images.entry.js.map