'use strict';

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

const index = require('./index-0b1e2673.js');
require('./_commonjsHelpers-937cd5b3.js');
const index$1 = require('./index-2eb96242.js');
const index$2 = require('./index-8a61808f.js');

const styleCss = ".sc-payfunc-address-display-h{display:block;border-top:1px solid rgb(var(--smoothly-medium-color));border-bottom:1px solid rgb(var(--smoothly-medium-color))}";

const PayfuncAddressDisplay = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  render() {
    var _a, _b, _c;
    const value = typeof this.value == "string" ? JSON.parse(this.value) : this.value;
    return value.countryCode == "" ? (index.h("address", null, (_a = value.address1) !== null && _a !== void 0 ? _a : "", index.h("br", null), (_b = value.address2) !== null && _b !== void 0 ? _b : "", index.h("br", null), (_c = value.address3) !== null && _c !== void 0 ? _c : "")) : (index.h("address", null, value.street, index.h("br", null), value.zipCode, " ", value.city, index.h("br", null), index$1.Address.DE.is(value) || (index$1.Address.General.is(value) && value.state) ? value.state + " " : [], index$2.dist.CountryCode.Name.from("en", value.countryCode)));
  }
};
PayfuncAddressDisplay.style = styleCss;

exports.payfunc_address_display = PayfuncAddressDisplay;
