'use strict';

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

const index = require('./index-df541290.js');
const index$2 = require('./index-b2d76b32.js');
const index$1 = require('./index-fe50ed35.js');
require('./_commonjsHelpers-5bbc2693.js');
require('./index-c277d1ea.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;
