import { h } from "@stencil/core";
export const mapModuleServerDataToComboBoxModel = (servers) => servers.map(server => ({
    value: server.id,
    caption: server.name
}));
export const mapModuleVersionDataToComboBoxModel = (moduleVersions) => moduleVersions.map(moduleVersion => ({
    value: moduleVersion.id,
    caption: moduleVersion.name
}));
export const renderModuleDataProperties = (options) => {
    if (options.length) {
        const items = [];
        options.forEach(option => {
            const isArray = Array.isArray(option.value);
            if (isArray && option.value.length) {
                const item = (h("div", { class: "md-property__list-container" }, h("p", { class: "md-property__key subtitle-semi-bold-xs" }, option.name, " :"), h("ul", { class: "md-property__list" }, option.value.map(subItem => {
                    return (h("li", { class: "md-property__list-item body-regular-s" }, subItem));
                }))));
                items.push(item);
            }
            else if (!isArray) {
                const item = (h("div", { class: option.inline
                        ? "md-property md-property--inline"
                        : "md-property md-property--block" }, h("p", { class: "md-property__key subtitle-semi-bold-xs" }, option.name, " :"), h("p", { class: "md-property__value body-regular-s" }, option.value)));
                items.push(item);
            }
        });
        return items;
    }
    return null;
};
//# sourceMappingURL=helpers.js.map
