import{r as t,h as e,H as s,g as i}from"./p-BIwHMk6j.js";import{b as o}from"./p-D5qhls4G.js";const h=class{constructor(e){t(this,e),this.shouldRender=!1}componentWillLoad(){this.compileAndEvaluate()}onRuleChange(){this.compileAndEvaluate()}onScopeChange(){this.compileAndEvaluate()}render(){return e(s,{key:"365df6908301371b8b964671382ad936971b6624",hidden:!this.shouldRender},e("slot",{key:"ca7c2a9febf0189dfae882a2ae894d1d0262a213"}))}get ruleRegistry(){return this.platform.get(o.RuleRegistry)}compileAndEvaluate(){var t;if(this.rule)try{const e=this.ruleRegistry.compile(this.rule),s=null!==(t=this.scope)&&void 0!==t?t:this.ruleRegistry.scope({host:this.host});this.shouldRender=e(s)}catch(t){console.warn("rule-gate failed to compile rule; hiding slot",{rule:this.rule,error:t}),this.shouldRender=!1}else this.shouldRender=!0}get host(){return i(this)}static get watchers(){return{rule:[{onRuleChange:0}],scope:[{onScopeChange:0}]}}};h.style=":host{display:contents}:host([hidden]){display:none}";export{h as limebb_rule_gate}