import { p as proxyCustomElement, H, h } from './p-604af0ee.js';

const DgaList$1 = /*@__PURE__*/ proxyCustomElement(class DgaList extends H {
    constructor() {
        super();
        this.__registerHost();
        this.type = 'unordered';
        this.color = 'primary';
        //   @Prop() id: string = guid();
        this.title = "";
        this.items = [];
        this.renderIcon = (type) => {
            if (type === "with-icon") {
                return h("span", { class: "list-icon" }, "\u2713"); // Using checkmark icon for "with-icon" type
            }
            return null;
        };
    }
    render() {
        const Tag = this.type === 'ordered' ? 'ol' : 'ul';
        return (h("div", { key: '84a57be73577f75022c094ad379c5a17d008c19b', class: `list list--${this.type} list--${this.color}` }, this.title && h("h3", { key: 'a2d42d5b9142ec7fe78407531560eab833bd199e', class: "list-title" }, this.title), h(Tag, { key: 'b707d34dce128f395b9e3d22c568552de117a9f3' }, this.items.map((item, index) => (h("li", { key: index, class: "list-item" }, this.type === "with-icon" && this.renderIcon(this.type), item))))));
    }
}, [0, "dga-list", {
        "type": [1],
        "color": [1],
        "title": [1],
        "items": [16]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["dga-list"];
    components.forEach(tagName => { switch (tagName) {
        case "dga-list":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, DgaList$1);
            }
            break;
    } });
}

const DgaList = DgaList$1;
const defineCustomElement = defineCustomElement$1;

export { DgaList, defineCustomElement };

//# sourceMappingURL=dga-list.js.map