import { h } from "@stencil/core";
/**
 * PageHeader 页头组件
 * 用于页面的头部区域，通常包含返回箭头、标题、副标题与右侧操作区
 */
export class PageHeader {
    /** 标题 */
    title = '';
    /** 副标题 */
    subtitle = '';
    /** 是否显示返回箭头 */
    back = false;
    /** 幽灵模式（透明背景） */
    ghost = false;
    /** 返回箭头点击事件 */
    hbBack;
    handleBack = (e) => {
        e.stopPropagation();
        this.hbBack.emit();
    };
    render() {
        return (h("div", { key: '1b030e60e77df9e97b6d60f704e521c05ae7af51', class: { 'hb-page-header': true, 'hb-page-header--ghost': this.ghost } }, h("div", { key: '2ee91ddf333fe5e771c9cbb0a62b14b03a3b1663', class: "hb-page-header__main" }, this.back && (h("button", { key: '225309da83f36a22e5e75200344399bcb94a3391', type: "button", class: "hb-page-header__back", onClick: this.handleBack, "aria-label": "\u8FD4\u56DE" }, h("span", { key: '1f67010455c9c682df8cefbb2dd81b1a41a73457', class: "hb-page-header__back-arrow" }, "\u2190"))), h("div", { key: '50ec1439869c987330e4536fe6f12e62416b1527', class: "hb-page-header__titles" }, this.title && h("span", { key: 'cdfde7eb8f6b643ea01327c87cab94db474b0825', class: "hb-page-header__title" }, this.title), this.subtitle && h("span", { key: '21756140f35d3fb19cea52d6c5a9e759641c0118', class: "hb-page-header__subtitle" }, this.subtitle))), h("div", { key: '59b5e1c8a71f17e9bb647394048ffe9484a85a5a', class: "hb-page-header__extra" }, h("slot", { key: '2c0543b118ac038e47b0aad6b389b996bf4f163c' }))));
    }
    static get is() { return "hb-page-header"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["page-header.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["page-header.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": "''"
            },
            "subtitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u526F\u6807\u9898"
                },
                "getter": false,
                "setter": false,
                "attribute": "subtitle",
                "reflect": false,
                "defaultValue": "''"
            },
            "back": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u662F\u5426\u663E\u793A\u8FD4\u56DE\u7BAD\u5934"
                },
                "getter": false,
                "setter": false,
                "attribute": "back",
                "reflect": false,
                "defaultValue": "false"
            },
            "ghost": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\u5E7D\u7075\u6A21\u5F0F\uFF08\u900F\u660E\u80CC\u666F\uFF09"
                },
                "getter": false,
                "setter": false,
                "attribute": "ghost",
                "reflect": false,
                "defaultValue": "false"
            }
        };
    }
    static get events() {
        return [{
                "method": "hbBack",
                "name": "hbBack",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "\u8FD4\u56DE\u7BAD\u5934\u70B9\u51FB\u4E8B\u4EF6"
                },
                "complexType": {
                    "original": "void",
                    "resolved": "void",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=PageHeader.js.map
