import { h } from "@stencil/core";
/**
 * Descriptions 描述列表组件
 * 成组展示多个描述字段，支持列数、边框、冒号、跨列 span
 */
export class Descriptions {
    /** 标题 */
    title = '';
    /** 是否带边框 */
    border = false;
    /** 每行列数 */
    column = 3;
    /** 是否显示冒号 */
    colon = true;
    /** 描述项数组 */
    items = [];
    render() {
        return (h("div", { key: 'bc13fcaa734ea3830c26a296e219dc90c4c453eb', class: { 'hb-descriptions': true, 'hb-descriptions--bordered': this.border } }, this.title && h("div", { key: 'e64aba674b0f6d7e460f00c0f786b670dc92da0f', class: "hb-descriptions__title" }, this.title), h("div", { key: '4cca9b0c834a60baf81d8668f79302934817f395', class: "hb-descriptions__view" }, h("div", { key: '9c321483b77f58ecb2b8bbdfba9049b7cdd11c73', class: "hb-descriptions__row", style: { gridTemplateColumns: `repeat(${this.column}, minmax(0, 1fr))` } }, this.items.map((item) => (h("div", { class: "hb-descriptions__item", style: item.span ? { gridColumn: `span ${item.span}` } : undefined }, h("span", { class: "hb-descriptions__label" }, item.label, this.colon && h("span", { class: "hb-descriptions__colon" }, "\uFF1A")), h("span", { class: "hb-descriptions__value" }, item.value))))))));
    }
    static get is() { return "hb-descriptions"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["descriptions.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["descriptions.css"]
        };
    }
    static get properties() {
        return {
            "title": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u6807\u9898"
                },
                "getter": false,
                "setter": false,
                "attribute": "title",
                "reflect": false,
                "defaultValue": "''"
            },
            "border": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u662F\u5426\u5E26\u8FB9\u6846"
                },
                "getter": false,
                "setter": false,
                "attribute": "border",
                "reflect": false,
                "defaultValue": "false"
            },
            "column": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u6BCF\u884C\u5217\u6570"
                },
                "getter": false,
                "setter": false,
                "attribute": "column",
                "reflect": false,
                "defaultValue": "3"
            },
            "colon": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u662F\u5426\u663E\u793A\u5192\u53F7"
                },
                "getter": false,
                "setter": false,
                "attribute": "colon",
                "reflect": false,
                "defaultValue": "true"
            },
            "items": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "DescriptionItem[]",
                    "resolved": "DescriptionItem[]",
                    "references": {
                        "DescriptionItem": {
                            "location": "local",
                            "path": "/Users/vscoderwhy/Desktop/product/web-common/huibo-ui/src/components/Descriptions/Descriptions.tsx",
                            "id": "src/components/Descriptions/Descriptions.tsx::DescriptionItem"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u63CF\u8FF0\u9879\u6570\u7EC4"
                },
                "getter": false,
                "setter": false,
                "defaultValue": "[]"
            }
        };
    }
}
//# sourceMappingURL=Descriptions.js.map
