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:"4b79c3c7fa9690a6a6764d9f3c060eb7c5a8185d",part:"base",class:{"breadcrumb-item":!0,"breadcrumb-item--has-prefix":this.hasPrefix,"breadcrumb-item--has-suffix":this.hasSuffix}},h("span",{key:"77e4d0b0c426dab56a2e22855a37d990cc64dbf1",part:"prefix",class:"breadcrumb-item__prefix"},h("slot",{key:"3e32322090483a7261f949762f3e177f3db73362",name:"prefix"})),h(e,{key:"eaf2021791d3f6e193682fb6ab4dc6d0006154bf",part:"label",class:"breadcrumb-item__label breadcrumb-item__label--link",href:this.href,target:this.target,rel:this.rel},h("slot",{key:"51e8f31215fb0448a21cd196d26fb3555a007c0d"})),h("span",{key:"9c9acdf10473207be02cdc67ccb43562bfa90790",part:"suffix",class:"breadcrumb-item__suffix"},h("slot",{key:"2556f255c1043dff317d6051c80ba244c0ca304d",name:"suffix",onSlotchange:()=>this.handleSlotChange()})),h("span",{key:"dba168e91a980b94fe932f56075263ae5ad412fc",part:"separator",class:"breadcrumb-item__separator","aria-hidden":"true"},h("slot",{key:"4e688d4c15c131b33b02456482b6ee85386349fd",name:"separator",onSlotchange:()=>this.handleSlotChange()},h("sc-icon",{key:"e25f6b58ef088caa681d1f737d41235b93779c56",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"}}