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:"f658e7682f9fc28684692fd38033279d1bdaaef0",part:"base",class:{"breadcrumb-item":!0,"breadcrumb-item--has-prefix":this.hasPrefix,"breadcrumb-item--has-suffix":this.hasSuffix}},h("span",{key:"c3eec9c1cea74a5f25e7b54dc99cec0ee7e2d94a",part:"prefix",class:"breadcrumb-item__prefix"},h("slot",{key:"643bbd551b56e53309c80a6e340aa61eada99f06",name:"prefix"})),h(e,{key:"18a29ec38b27bba5f8a8e9753f95fd20115802cb",part:"label",class:"breadcrumb-item__label breadcrumb-item__label--link",href:this.href,target:this.target,rel:this.rel},h("slot",{key:"245091debe24fa6e4e80fd34b9445ccfd21d5100"})),h("span",{key:"69d40adc2fe1b997054bee6aa069cb1f329c44f4",part:"suffix",class:"breadcrumb-item__suffix"},h("slot",{key:"8183140c6b384e58fffa9408b3273c3ab5d8c86b",name:"suffix",onSlotchange:()=>this.handleSlotChange()})),h("span",{key:"8688760b7a444d0b32850de9df824e7cbc81c542",part:"separator",class:"breadcrumb-item__separator","aria-hidden":"true"},h("slot",{key:"850c7fbbfede3f51103d2fb9431e713f75ea5c44",name:"separator",onSlotchange:()=>this.handleSlotChange()},h("sc-icon",{key:"22653e04188ddc4cf3375f6d280941ccd3f21d5f",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"}}