import { Component, h, Host, Prop, State } from '@stencil/core';
import { __ } from '@wordpress/i18n';
export class ScUpgradeRequired {
  constructor() {
    /** The tag's size. */
    this.size = 'small';
    this.required = true;
    this.open = false;
  }
  render() {
    if (!this.required) {
      return (h(Host, null,
        h("slot", null)));
    }
    return (h(Host, { onClick: () => (this.open = true) },
      h("span", { class: "trigger" },
        h("span", { class: "trigger__disabled" },
          h("slot", null,
            h("sc-premium-badge", null)))),
      h("sc-dialog", { label: __('Boost Your Revenue', 'surecart'), open: this.open, onScRequestClose: () => (this.open = false), style: { '--width': '21rem', 'fontSize': '15px', '--body-spacing': '2rem' } },
        h("span", { class: "dialog__title", slot: "label" },
          h("sc-icon", { name: "zap" }),
          h("span", null, __('Boost Your Revenue', 'surecart'))),
        h("p", null, __('Unlock revenue boosting features when you upgrade your plan!', 'surecart')),
        h("sc-button", { href: "https://app.surecart.com/billing", type: "primary", target: "_blank", full: true },
          __('Upgrade Now', 'surecart'),
          h("sc-icon", { name: "arrow-right", slot: "suffix" })))));
  }
  static get is() { return "sc-upgrade-required"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["sc-upgrade-required.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["sc-upgrade-required.css"]
  }; }
  static get properties() { return {
    "size": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'small' | 'medium' | 'large'",
        "resolved": "\"large\" | \"medium\" | \"small\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "The tag's size."
      },
      "attribute": "size",
      "reflect": true,
      "defaultValue": "'small'"
    },
    "required": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "required",
      "reflect": true,
      "defaultValue": "true"
    }
  }; }
  static get states() { return {
    "open": {}
  }; }
}
