import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { _ as __ } from './default-i18n.js';
import './index2.js';
import { d as defineCustomElement$1 } from './sc-tag2.js';

const scOrderStatusBadgeCss = ":host{display:inline-block}";

const ScOrderStatusBadge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    /** The tag's size. */
    this.size = 'medium';
    /** Draws a pill-style tag with rounded edges. */
    this.pill = false;
    /** Makes the tag clearable. */
    this.clearable = false;
  }
  getType() {
    switch (this.status) {
      case 'processing':
        return 'warning';
      case 'paid':
        return 'success';
      case 'payment_failed':
        return 'danger';
      case 'canceled':
        return 'danger';
      case 'void':
        return 'default';
      case 'canceled':
        return 'danger';
    }
  }
  getText() {
    switch (this.status) {
      case 'processing':
        return __('Processing', 'surecart');
      case 'payment_failed':
        return __('Payment Failed', 'surecart');
      case 'paid':
        return __('Paid', 'surecart');
      case 'canceled':
        return __('Canceled', 'surecart');
      case 'void':
        return __('Void', 'surecart');
      case 'canceled':
        return __('Canceled', 'surecart');
      default:
        return this.status;
    }
  }
  render() {
    return h("sc-tag", { type: this.getType() }, this.getText());
  }
  static get style() { return scOrderStatusBadgeCss; }
}, [1, "sc-order-status-badge", {
    "status": [1],
    "size": [513],
    "pill": [516],
    "clearable": [4]
  }]);
function defineCustomElement() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sc-order-status-badge", "sc-tag"];
  components.forEach(tagName => { switch (tagName) {
    case "sc-order-status-badge":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, ScOrderStatusBadge);
      }
      break;
    case "sc-tag":
      if (!customElements.get(tagName)) {
        defineCustomElement$1();
      }
      break;
  } });
}
defineCustomElement();

export { ScOrderStatusBadge as S, defineCustomElement as d };
