import { Component, Host, h, Prop } from '@stencil/core';
import { hasAnyRuleGroupPassed } from './conditional-functions';
import { state as selectedProcessor } from '@store/selected-processor';
import { currentCheckout } from '@store/checkout/getters';
export class ScConditionalForm {
  render() {
    let show = hasAnyRuleGroupPassed(this.rule_groups, { checkout: currentCheckout(), processor: selectedProcessor === null || selectedProcessor === void 0 ? void 0 : selectedProcessor.id });
    if (!show)
      return null;
    return (h(Host, null,
      h("slot", null)));
  }
  static get is() { return "sc-conditional-form"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["sc-conditional-form.css"]
  }; }
  static get styleUrls() { return {
    "$": ["sc-conditional-form.css"]
  }; }
  static get properties() { return {
    "rule_groups": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "RuleGroup[]",
        "resolved": "RuleGroup[]",
        "references": {
          "RuleGroup": {
            "location": "import",
            "path": "../../../../types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Selector label"
      }
    }
  }; }
}
