'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-5aa5c817.js');

const BreadcrumbItem = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    get el() { return index.getElement(this); }
    /** 链接地址 */
    href;
    render() {
        const Tag = this.href ? 'a' : 'span';
        // 从父级 hb-breadcrumb 读取分隔符 prop
        // 优先级：item 的 separator slot > breadcrumb.separator > 默认 '/'
        const parentSeparator = this.el.closest('hb-breadcrumb')?.separator;
        return (index.h("span", { key: 'f9ced0c34ef309a1240258786b4ecba3055caeed', class: "hb-breadcrumb-item" }, index.h(Tag, { key: '2218776bb05edeba450f3ecaa23c6602f4ff3480', class: "hb-breadcrumb-item__inner", href: this.href }, index.h("slot", { key: '5598e7b2fbd95c16b5ad5456f36c97e708104cf9' })), index.h("span", { key: 'fcb0f6f10b2707a8d1d3d882e80854b0b24cb665', class: "hb-breadcrumb-item__separator" }, index.h("slot", { key: '502eec59718fdd8391132d2395bc4d4420e851b1', name: "separator" }, parentSeparator ?? '/'))));
    }
};

exports.hb_breadcrumb_item = BreadcrumbItem;

//# sourceMappingURL=hb-breadcrumb-item.cjs.entry.js.map