import { r as registerInstance, h } from './index-fd4790f6.js';
import { _ as __ } from './default-i18n-2e663329.js';
import './index-53ddb833.js';
import './index-6db066f7.js';

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

const ScOrderStatusBadge = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    /** 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());
  }
};
ScOrderStatusBadge.style = scOrderStatusBadgeCss;

export { ScOrderStatusBadge as sc_order_status_badge };
