'use strict';

const index = require('./index-75aef097.js');
const assetsManager = require('./assets-manager-089e91b1.js');
require('./mer-animated-dots-78490ca4.js');
require('lit');
require('lit/directives/when.js');
require('lit/directives/if-defined.js');

// Stencil
const INSERTED_ICON = assetsManager.getIconPath({
    category: "system",
    name: "add",
    colorType: "success"
});
const EDITED_ICON = assetsManager.getIconPath({
    category: "system",
    name: "edit",
    colorType: "warning"
});
const DELETED_ICON = assetsManager.getIconPath({
    category: "system",
    name: "substract",
    colorType: "error"
});
const WARNING_ICON = assetsManager.getIconPath({
    category: "system",
    name: "warning",
    colorType: "warning"
});
/**
 * Renders a visual indicator (icon and label) for a given object state.
 *
 * This helper function maps a fixed set of object states to corresponding icons
 *
 * Supported states:
 * - "inserted": Displays a green "add" icon.
 * - "modified": Displays a yellow "edit" icon.
 * - "deleted": Displays a red "subtract" icon.
 * - "conflicted": Displays a yellow "warning" icon.
 *
 * @param {ObjectState} objectState - The current state of the object.
 * @returns {HTMLChImageElement} A span element containing the corresponding icon and state label.
 */
const renderObjectStateWithIcon = (objectState) => {
    let icon;
    switch (objectState) {
        case "inserted":
            icon = INSERTED_ICON;
            break;
        case "modified":
            icon = EDITED_ICON;
            break;
        case "deleted":
            icon = DELETED_ICON;
            break;
        case "conflicted":
            icon = WARNING_ICON;
            break;
    }
    return (index.h("span", { class: "custom-icon-text-wrapper" },
        index.h("ch-image", { class: "icon-m", src: icon }),
        `${objectState.charAt(0).toUpperCase() + objectState.slice(1)}`));
};
/**
 * Renders a GeneXus object type as a span element containing its icon and name.
 *
 * @param {ObjectType} objectType - The GeneXus object type to render, including its `icon` and `name` properties.
 * @returns {JSX.Element} A span element with the object's icon and label.
 */
const renderObjectTypeWithIcon = (objectType) => {
    // bring changes
    const icon = objectType.icon;
    return (index.h("span", { class: "custom-icon-text-wrapper" },
        index.h("ch-image", { class: "icon-m", src: icon }),
        `${objectType.name}`));
};

const ALL_VALUE = "All";
const CSS_SELECTORS = {
    HEADER: "header spacing-body-inline spacing-body-block-start",
    HEADER_DETAILS: "header__details",
    FILTER: "filter",
    MAIN: "main spacing-body",
    GRID_CELL_DESCRIPTION: "tabular-grid-cell-description-custom-selector"
};
const ICONS = {
    add: assetsManager.getIconPath({
        category: "system",
        name: "add",
        colorType: "on-surface"
    }),
    edit: assetsManager.getIconPath({
        category: "system",
        name: "edit",
        colorType: "on-surface"
    }),
    error: assetsManager.getIconPath({
        category: "system",
        name: "error",
        colorType: "error"
    }),
    filter: assetsManager.getIconPath({
        category: "window-tools",
        name: "filter",
        colorType: "interactive"
    }),
    filterWithConditions: assetsManager.getIconPath({
        category: "window-tools",
        name: "filter-conditions",
        colorType: "interactive"
    }),
    info: assetsManager.getIconPath({
        category: "system",
        name: "information",
        colorType: "on-surface"
    }),
    refresh: assetsManager.getIconPath({
        category: "gemini-tools",
        name: "reset",
        colorType: "interactive"
    }),
    search: assetsManager.getIconPath({
        category: "system",
        name: "search",
        colorType: "on-surface"
    }),
    success: assetsManager.getIconPath({
        category: "system",
        name: "check",
        colorType: "success"
    }),
    substract: assetsManager.getIconPath({
        category: "system",
        name: "substract",
        colorType: "on-surface"
    }),
    warning: assetsManager.getIconPath({
        category: "system",
        name: "warning",
        colorType: "warning"
    })
};

exports.ALL_VALUE = ALL_VALUE;
exports.CSS_SELECTORS = CSS_SELECTORS;
exports.ICONS = ICONS;
exports.renderObjectStateWithIcon = renderObjectStateWithIcon;
exports.renderObjectTypeWithIcon = renderObjectTypeWithIcon;

//# sourceMappingURL=constants-1fb674a5.js.map