import { Host, h } from "@stencil/core";
/**
 * @slot heading - Content will be placed at the top of the data list.
 */
export class DataList {
    constructor() {
        /**
         * The size of the data list component.
         */
        this.size = "medium";
        /**
         * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
         */
        this.theme = "inherit";
    }
    render() {
        const { el, heading, size, theme } = this;
        if (size === "small") {
            Array.from(el.children).forEach((child) => child.setAttribute("size", "small"));
        }
        const hasHeading = heading || el.querySelector('[slot="heading"]');
        return (h(Host, { key: '57df6c957322ddb4cdda3901c64e919656abf92e', class: {
                "ic-data-list-small": size === "small",
                [`ic-theme-${theme}`]: theme !== "inherit",
            } }, h("div", { key: '273e0ce2fcde309669514b332964e129d1ef42a6', class: "heading", id: "data-list-heading" }, h("slot", { key: '1be24c7150c268064207cf58f083ab9bd8cb27c7', name: "heading" }, h("ic-typography", { key: '30858cd0d5c66204a030449c5b8212c1c41d1838', variant: "h3" }, heading))), h("div", { key: '2f13fa15abc8053f312ff21454b6a89d15b4eabd', class: { divider: true, "divider-no-heading": !hasHeading } }), h("ul", { key: '582dd8f21ce4e3a9dd845aa46294ebe2c5163d01', "aria-labelledby": "data-list-heading", class: "rows" }, h("slot", { key: '42b137d71f0c9e3f836f1efdde58f62d90b080a4' }))));
    }
    static get is() { return "ic-data-list"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["ic-data-list.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["ic-data-list.css"]
        };
    }
    static get properties() {
        return {
            "heading": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string | undefined",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The title for the data list."
                },
                "getter": false,
                "setter": false,
                "attribute": "heading",
                "reflect": false
            },
            "size": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IcSizesNoLarge",
                    "resolved": "\"medium\" | \"small\" | undefined",
                    "references": {
                        "IcSizesNoLarge": {
                            "location": "import",
                            "path": "../../utils/types",
                            "id": "src/utils/types.ts::IcSizesNoLarge"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The size of the data list component."
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": false,
                "defaultValue": "\"medium\""
            },
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IcThemeMode",
                    "resolved": "\"dark\" | \"inherit\" | \"light\" | undefined",
                    "references": {
                        "IcThemeMode": {
                            "location": "import",
                            "path": "../../utils/types",
                            "id": "src/utils/types.ts::IcThemeMode"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component."
                },
                "getter": false,
                "setter": false,
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "\"inherit\""
            }
        };
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=ic-data-list.js.map
