import{r as t,c as s,h as i}from"./p-1a7a8b00.js";const e=class{constructor(i){t(this,i),this.navigateBack=s(this,"navigateBack",7),this.text="",this.icon="chevron-left",this.buttonDisabled=!1,this.cssClasses=void 0,this.useExternal=!1}resetState(){}componentWillLoad(){this.useExternal=!!customElements.get("bp-sdk-external-back-button"),customElements.whenDefined("bp-sdk-external-back-button").then((()=>{this.useExternal=!0})),this.isButtonDisabled(this.buttonDisabled)}isButtonDisabled(t){this.buttonDisabled=t}render(){return[this.useExternal&&this.renderExternal(),!this.useExternal&&this.renderInternal()]}renderExternal(){return i("bp-sdk-external-back-button",{buttonDisabled:this.buttonDisabled,cssClasses:this.cssClasses,icon:this.icon,text:this.text})}renderInternal(){return i("div",{class:"bp-sdk-back-button__container"},i("bp-sdk-button",{onClick:()=>!this.buttonDisabled&&this.navigateBack.emit(),text:this.text,buttonDisabled:this.buttonDisabled,class:this.cssClasses},i("bp-sdk-icon-container",{name:this.icon})))}static get watchers(){return{buttonDisabled:["isButtonDisabled"]}}};e.style="";export{e as bp_sdk_back_button}