import { r as registerInstance, h } from './index-07845439.js';
import { d as dist } from './index-837ba18a.js';
import './_commonjsHelpers-8fe71198.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 };
