import { r as registerInstance, h } from './index-aeac5cad.js';
import './_commonjsHelpers-91fffb88.js';
import { d as dist } from './index-ff2f9e0e.js';

const styleCss = ".sc-smoothly-display-h{display:block}[hidden].sc-smoothly-display-h{display:none}";

const SmoothlyDisplay = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    let result;
    const type = this.type;
    switch (type) {
      default:
        result = dist.format(this.value, type);
        break;
      case "email":
        result = h("a", { href: "mailto:" + this.value }, dist.format(this.value, type));
        break;
      case "phone":
        result = h("a", { href: "tel:" + this.value }, dist.format(this.value, type, this.country));
        break;
      case "postal-code":
        result = dist.format(this.value, type, this.country);
        break;
      case "price":
        result = dist.format(this.value, type, this.currency);
        break;
    }
    return result;
  }
};
SmoothlyDisplay.style = styleCss;

export { SmoothlyDisplay as smoothly_display };
