import{r as t,h as s}from"./p-1a7a8b00.js";import{s as i}from"./p-b4467cc2.js";import"./p-a44cd541.js";const e=class{constructor(s){t(this,s),this.handleSubscriptions=()=>{this.storeUnsubscribe&&this.storeUnsubscribe(),this.storeUnsubscribe=i.mapStateToProps(this,this.mapStateToProps)},this.mapStateToProps=t=>({isHidden:!(!this.filter||!this.filter(t))}),this.filter=void 0,this.isHidden=!1,this.useExternal=!1}resetState(){}onFilterChange(){this.handleSubscriptions()}connectedCallback(){this.resetState(),this.handleSubscriptions()}componentWillLoad(){this.useExternal=!!customElements.get("bp-sdk-external-filter-container"),customElements.whenDefined("bp-sdk-external-filter-container").then((()=>{this.useExternal=!0})),this.onFilterChange()}render(){return[this.useExternal&&this.renderExternal(),!this.useExternal&&this.renderInternal()]}renderExternal(){return s("bp-sdk-external-filter-container",{filter:this.filter,isHidden:this.isHidden})}renderInternal(){return!this.isHidden&&s("div",{class:"bp-sdk-filter-container__container"},s("host",null))}static get watchers(){return{filter:["onFilterChange"]}}};e.style="";export{e as bp_sdk_filter_container}