'use strict';

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

const index = require('./index-0b1e2673.js');
require('./_commonjsHelpers-937cd5b3.js');
const index$1 = require('./index-a802b56a.js');

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

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

exports.smoothly_display = SmoothlyDisplay;
