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:"7239d5e6a902f999dfb652e442d94b7761778de3",part:"base",class:{"breadcrumb-item":!0,"breadcrumb-item--has-prefix":this.hasPrefix,"breadcrumb-item--has-suffix":this.hasSuffix}},h("span",{key:"dec24458b4ddc285dffd36ac66042b1683d878eb",part:"prefix",class:"breadcrumb-item__prefix"},h("slot",{key:"b4802136ba888e2559a1838ea26cf8c48584ff94",name:"prefix"})),h(e,{key:"5574a2ee9ba0e492b0f9105fe3537e90e9dbd165",part:"label",class:"breadcrumb-item__label breadcrumb-item__label--link",href:this.href,target:this.target,rel:this.rel},h("slot",{key:"7220c9aae004fa90188a5a288bd7b28d0d303aec"})),h("span",{key:"1021eb8d314c57522d5c45fb2a600a2545fea5fd",part:"suffix",class:"breadcrumb-item__suffix"},h("slot",{key:"64350c9f1e76cb08d976c12b084969425073d579",name:"suffix",onSlotchange:()=>this.handleSlotChange()})),h("span",{key:"ff25470a89cb1fd147103daab0c5f6aee1774c9d",part:"separator",class:"breadcrumb-item__separator","aria-hidden":"true"},h("slot",{key:"1a824c7acc8f65bfab60748912c2284db88cc8f9",name:"separator",onSlotchange:()=>this.handleSlotChange()},h("sc-icon",{key:"6589208510906a71ed27710462a4f6016838e112",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"}}