import{h}from"@stencil/core";export class ScBreadcrumb{constructor(){this.href=void 0,this.target=void 0,this.rel="noreferrer noopener",this.hasPrefix=void 0,this.hasSuffix=void 0}handleSlotChange(){this.hasPrefix=!!this.el.querySelector('[slot="prefix"]'),this.hasSuffix=!!this.el.querySelector('[slot="suffix"]')}render(){const e=this.href?"a":"div";return h("div",{key:"b3792cb3b12f9386eb37ee52387b1450ff475b5e",part:"base",class:{"breadcrumb-item":!0,"breadcrumb-item--has-prefix":this.hasPrefix,"breadcrumb-item--has-suffix":this.hasSuffix}},h("span",{key:"da5d8e8d692d87b0e039fcfc9701008ee8e265ca",part:"prefix",class:"breadcrumb-item__prefix"},h("slot",{key:"3c4580346d9b4563216c97e97b9c5ca023e5659e",name:"prefix"})),h(e,{key:"59973b5493b6b0000c98020dd5046967b1dd8e93",part:"label",class:"breadcrumb-item__label breadcrumb-item__label--link",href:this.href,target:this.target,rel:this.rel},h("slot",{key:"11226f11b4ebeaad2031a646305e670fb562c408"})),h("span",{key:"4892190042395b2539931bb374fc0e3f094f00b3",part:"suffix",class:"breadcrumb-item__suffix"},h("slot",{key:"a0d2c8f0498d8488e73621b443d93c7066adeabf",name:"suffix",onSlotchange:()=>this.handleSlotChange()})),h("span",{key:"7414fe21bf17eb171613e371985d86e7284f1023",part:"separator",class:"breadcrumb-item__separator","aria-hidden":"true"},h("slot",{key:"b97d532ce1b5c89fc27feef4f33b974cfbc9dae5",name:"separator",onSlotchange:()=>this.handleSlotChange()},h("sc-icon",{key:"91bce635ab88af6c8704989bdb5464067f1d96c7",name:"chevron-right"}))))}static get is(){return"sc-breadcrumb"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["sc-breadcrumb.css"]}}static get styleUrls(){return{$:["sc-breadcrumb.css"]}}static get properties(){return{href:{type:"string",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!0,docs:{tags:[],text:"Optional URL to direct the user to when the breadcrumb item is activated. When set, a link will be rendered\ninternally. When unset, a button will be rendered instead."},attribute:"href",reflect:!1},target:{type:"string",mutable:!1,complexType:{original:"'_blank' | '_parent' | '_self' | '_top'",resolved:'"_blank" | "_parent" | "_self" | "_top"',references:{}},required:!1,optional:!0,docs:{tags:[],text:"Tells the browser where to open the link. Only used when `href` is set."},attribute:"target",reflect:!1},rel:{type:"string",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:"The `rel` attribute to use on the link. Only used when `href` is set."},attribute:"rel",reflect:!1,defaultValue:"'noreferrer noopener'"}}}static get states(){return{hasPrefix:{},hasSuffix:{}}}static get elementRef(){return"el"}}