import { h } from '@stencil/core';
export class List {
    constructor() {
        /**
         * Optional, styles the density of the list, making it appear more compact.
         */
        this.dense = false;
    }
    componentDidLoad() {
        const listItem = this.host.querySelectorAll('materials-list-item');
        const listItemCheckbox = this.host.querySelectorAll('materials-list-item-checkbox');
        if (this.size && listItem)
            Array.from(listItem).forEach(e => e.size = this.size);
        if (this.size && listItemCheckbox)
            Array.from(listItemCheckbox).forEach(e => e.size = this.size);
    }
    render() {
        return (h("ul", { class: { 'mdc-list': true, 'mdc-list--dense': this.dense } },
            h("slot", null)));
    }
    static get is() { return "materials-list"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() { return {
        "$": ["list.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["list.css"]
    }; }
    static get properties() { return {
        "dense": {
            "type": "boolean",
            "mutable": false,
            "complexType": {
                "original": "boolean",
                "resolved": "boolean",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Optional, styles the density of the list, making it appear more compact."
            },
            "attribute": "dense",
            "reflect": false,
            "defaultValue": "false"
        },
        "size": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "HTMLMaterialsListItemElement[\"size\"]",
                "resolved": "\"medium\" | \"small\"",
                "references": {
                    "HTMLMaterialsListItemElement": {
                        "location": "global"
                    }
                }
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "size",
            "reflect": false
        }
    }; }
    static get elementRef() { return "host"; }
}
