import { h } from "@stencil/core";
/**
 * Button 按钮组件
 * 常用的操作按钮
 */
export class Button {
    /** 按钮类型 */
    type = 'default';
    /** 按钮尺寸 */
    size = 'default';
    /** 自定义 class */
    classNames = '';
    /** 是否禁用 */
    disabled = false;
    /** 是否加载中 */
    loading = false;
    render() {
        return (h("button", { key: '1628f4fd2f0e565910115361d0be682cf3d813c6', disabled: this.disabled || this.loading, class: {
                'hb-button': true,
                [`hb-button--${this.type}`]: true,
                [`hb-button--${this.size}`]: true,
                'hb-button--disabled': this.disabled,
                'hb-button--loading': this.loading,
                [this.classNames]: !!this.classNames,
            } }, this.loading && h("span", { key: '305de3274e8bfce745beb06499da13bd3209f616', class: "hb-button__loading-icon" }, "\u23F3"), h("slot", { key: '624ab73421118eefd5b1e7590e18ddb713c7ce0c' })));
    }
    static get is() { return "hb-button"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["button.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["button.css"]
        };
    }
    static get properties() {
        return {
            "type": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'primary' | 'dashed' | 'link' | 'text' | 'default'",
                    "resolved": "\"dashed\" | \"default\" | \"link\" | \"primary\" | \"text\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u6309\u94AE\u7C7B\u578B"
                },
                "getter": false,
                "setter": false,
                "attribute": "type",
                "reflect": false,
                "defaultValue": "'default'"
            },
            "size": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'small' | 'default' | 'large'",
                    "resolved": "\"default\" | \"large\" | \"small\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u6309\u94AE\u5C3A\u5BF8"
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": false,
                "defaultValue": "'default'"
            },
            "classNames": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u81EA\u5B9A\u4E49 class"
                },
                "getter": false,
                "setter": false,
                "attribute": "class-names",
                "reflect": false,
                "defaultValue": "''"
            },
            "disabled": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u662F\u5426\u7981\u7528"
                },
                "getter": false,
                "setter": false,
                "attribute": "disabled",
                "reflect": false,
                "defaultValue": "false"
            },
            "loading": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u662F\u5426\u52A0\u8F7D\u4E2D"
                },
                "getter": false,
                "setter": false,
                "attribute": "loading",
                "reflect": false,
                "defaultValue": "false"
            }
        };
    }
}
//# sourceMappingURL=Button.js.map
