import { h } from "@stencil/core";
import { BEM } from "../../../utils/bem";
export const ServiceList = ({ items }) => {
    const block = BEM.block('nav');
    const hasNoItems = !(items && items.length > 0);
    if (hasNoItems) {
        return '';
    }
    return (h("ul", { class: Object.assign({}, block.element('mobile-section-list').class()) }, items === null || items === void 0 ? void 0 : items.map(serviceGroup => {
        var _a;
        return (h("li", null, h("a", { class: Object.assign({}, block.element('mobile-section-item').class()), href: serviceGroup.href, target: serviceGroup.target }, serviceGroup.label), h("ul", { class: Object.assign({}, block.element('mobile-links-list').class()) }, (_a = serviceGroup.linkItems) === null || _a === void 0 ? void 0 : _a.map(item => {
            return (h("li", null, h("a", { class: Object.assign({}, block.element('mobile-links').class()), href: item.href, target: item.target }, item.label)));
        }))));
    })));
};
