import { h } from "@stencil/core";
/**
 * Tag 标签组件
 * 用于标记和选择
 */
export class Tag {
    /** 标签类型 */
    type = 'default';
    /** 是否可关闭 */
    closable = false;
    /** 主题效果 */
    effect = 'light';
    /** 是否圆角 */
    round = false;
    /** 标签尺寸 */
    size = 'default';
    /** 关闭事件 */
    hbClose;
    handleClose = (e) => {
        e.stopPropagation();
        this.hbClose.emit();
    };
    render() {
        return (h("span", { key: 'e8663d8679aafe8d0838e5bc247ce0023fd64234', class: {
                'hb-tag': true,
                [`hb-tag--${this.type}`]: true,
                [`hb-tag--${this.effect}`]: true,
                'hb-tag--round': this.round,
                [`hb-tag--${this.size}`]: true,
            } }, h("span", { key: 'fb6d35fb1a76eac78bee548c74d0fb4aff560c28', class: "hb-tag__content" }, h("slot", { key: '450089e1e654bc339d6f99b8d763491277fc2b0e' })), this.closable && (h("span", { key: '8c115976d98f2242543f208d054cd2493b94373a', class: "hb-tag__close", role: "button", "aria-label": "\u79FB\u9664\u6807\u7B7E", tabIndex: 0, onClick: this.handleClose }, "\u00D7"))));
    }
    static get is() { return "hb-tag"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["tag.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["tag.css"]
        };
    }
    static get properties() {
        return {
            "type": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default'",
                    "resolved": "\"danger\" | \"default\" | \"info\" | \"primary\" | \"success\" | \"warning\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u6807\u7B7E\u7C7B\u578B"
                },
                "getter": false,
                "setter": false,
                "attribute": "type",
                "reflect": false,
                "defaultValue": "'default'"
            },
            "closable": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u662F\u5426\u53EF\u5173\u95ED"
                },
                "getter": false,
                "setter": false,
                "attribute": "closable",
                "reflect": false,
                "defaultValue": "false"
            },
            "effect": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'dark' | 'light' | 'plain'",
                    "resolved": "\"dark\" | \"light\" | \"plain\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u4E3B\u9898\u6548\u679C"
                },
                "getter": false,
                "setter": false,
                "attribute": "effect",
                "reflect": false,
                "defaultValue": "'light'"
            },
            "round": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u662F\u5426\u5706\u89D2"
                },
                "getter": false,
                "setter": false,
                "attribute": "round",
                "reflect": false,
                "defaultValue": "false"
            },
            "size": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'small' | 'default' | 'large'",
                    "resolved": "\"default\" | \"large\" | \"small\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u6807\u7B7E\u5C3A\u5BF8"
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": false,
                "defaultValue": "'default'"
            }
        };
    }
    static get events() {
        return [{
                "method": "hbClose",
                "name": "hbClose",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "\u5173\u95ED\u4E8B\u4EF6"
                },
                "complexType": {
                    "original": "void",
                    "resolved": "void",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=Tag.js.map
