import { h } from '@stencil/core';
export class Card {
    constructor() {
        this.width = 'auto';
        this.height = 'auto';
        this.elevation = 1;
    }
    componentDidLoad() {
        if (this.maxHeight)
            this.mdcCardEl.style.setProperty('max-height', this.maxHeight);
    }
    render() {
        return (h("div", { ref: elRef => { this.mdcCardEl = elRef; }, class: `mdc-card mdc-elevation--z${this.elevation}`, style: { 'height': this.height, 'width': this.width, 'padding': this.padding ? this.padding + 'px' : null } },
            h("slot", null)));
    }
    static get is() { return "materials-card"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() { return {
        "$": ["card.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["card.css"]
    }; }
    static get properties() { return {
        "width": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "width",
            "reflect": false,
            "defaultValue": "'auto'"
        },
        "height": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "height",
            "reflect": false,
            "defaultValue": "'auto'"
        },
        "maxHeight": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "max-height",
            "reflect": false
        },
        "elevation": {
            "type": "number",
            "mutable": false,
            "complexType": {
                "original": "number",
                "resolved": "number",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "elevation",
            "reflect": false,
            "defaultValue": "1"
        },
        "padding": {
            "type": "number",
            "mutable": false,
            "complexType": {
                "original": "number",
                "resolved": "number",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "padding",
            "reflect": false
        }
    }; }
    static get elementRef() { return "cardEl"; }
}
