'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-9c866aeb.js');
const defaultI18n = require('./default-i18n-d4248548.js');
require('./index-88baf240.js');
require('./index-04dc658f.js');

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

const ScOrderStatusBadge = class {
  constructor(hostRef) {
    index.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 defaultI18n.__('Processing', 'surecart');
      case 'payment_failed':
        return defaultI18n.__('Payment Failed', 'surecart');
      case 'paid':
        return defaultI18n.__('Paid', 'surecart');
      case 'canceled':
        return defaultI18n.__('Canceled', 'surecart');
      case 'void':
        return defaultI18n.__('Void', 'surecart');
      case 'canceled':
        return defaultI18n.__('Canceled', 'surecart');
      default:
        return this.status;
    }
  }
  render() {
    return index.h("sc-tag", { type: this.getType() }, this.getText());
  }
};
ScOrderStatusBadge.style = scOrderStatusBadgeCss;

exports.sc_order_status_badge = ScOrderStatusBadge;
