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:"66825739da5358c619e025859d18198ac45698ca",part:"base",class:{"breadcrumb-item":!0,"breadcrumb-item--has-prefix":this.hasPrefix,"breadcrumb-item--has-suffix":this.hasSuffix}},h("span",{key:"304c12c2b7717fc71de73cfdb4d2898c0b8048f6",part:"prefix",class:"breadcrumb-item__prefix"},h("slot",{key:"e659e6a691db6a0fbd010b8e2646bf6880ef92fc",name:"prefix"})),h(e,{key:"1d47827abe1bdad7da3360c41b91ad37f5dadebe",part:"label",class:"breadcrumb-item__label breadcrumb-item__label--link",href:this.href,target:this.target,rel:this.rel},h("slot",{key:"25b0a35b0d086ed743c44e2819c9cf8caee9d10a"})),h("span",{key:"6d1565bb00485e87f83145eef4bcf211770e3170",part:"suffix",class:"breadcrumb-item__suffix"},h("slot",{key:"980c9d854b1d98b9e8d29e808d66cd6c9c275e01",name:"suffix",onSlotchange:()=>this.handleSlotChange()})),h("span",{key:"9810502d3285dba3def2fda6d30f5a5168be856c",part:"separator",class:"breadcrumb-item__separator","aria-hidden":"true"},h("slot",{key:"0dbf3a5aa5048fc83f3c136436ca4525a7a95394",name:"separator",onSlotchange:()=>this.handleSlotChange()},h("sc-icon",{key:"8be971ab5b81dbb29bfa6d2a755fd4367d6b5af2",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"}}