import { r as registerInstance, h } from './index-D0dWnGvB.js';

const DgaList = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        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: '51b6f3cb5f86302c1d7d6882f832ed8d1c074d43', class: `list list--${this.type} list--${this.color}` }, this.title && h("h3", { key: '149cb916a7db8e4d43bdb104b674ae7cd64bbba9', class: "list-title" }, this.title), h(Tag, { key: '875ef6290fc1550a9c70b449278a8ef80e6ca04f' }, this.items.map((item, index) => (h("li", { key: index, class: "list-item" }, this.type === "with-icon" && this.renderIcon(this.type), item))))));
    }
};

export { DgaList as dga_list };
