import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { D as DetailSectionTitle, a as DetailItem } from './utils.js';
import { c as formatMediumDate } from './utils2.js';

const OwnerDetails = /*@__PURE__*/ proxyCustomElement(class OwnerDetails extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
    }
    render() {
        var _a;
        if (!((_a = this === null || this === void 0 ? void 0 : this.owners) === null || _a === void 0 ? void 0 : _a.length))
            return null;
        return (h(Host, null, !!(this === null || this === void 0 ? void 0 : this.owners.length) &&
            this.owners.map((owner) => {
                var _a, _b, _c, _d, _e;
                return [
                    h(DetailSectionTitle, { sectionTitle: `Owner ${owner === null || owner === void 0 ? void 0 : owner.name}'s Details` }),
                    h("div", { class: "d-flex flex-column gap-2 w-100 mt-3" }, h("div", { class: "col-md-6" }, h(DetailItem, { title: "Name", value: owner === null || owner === void 0 ? void 0 : owner.name }), h(DetailItem, { title: "Title", value: owner === null || owner === void 0 ? void 0 : owner.title }), h(DetailItem, { title: "Email", value: owner === null || owner === void 0 ? void 0 : owner.email }), h(DetailItem, { title: "Phone", value: owner === null || owner === void 0 ? void 0 : owner.phone }), h(DetailItem, { title: "Date of Birth", value: formatMediumDate(new Date(Number(owner === null || owner === void 0 ? void 0 : owner.dob_year), Number(owner === null || owner === void 0 ? void 0 : owner.dob_month) - 1, Number(owner === null || owner === void 0 ? void 0 : owner.dob_day))) }), h(DetailItem, { title: "Identification Number", value: `********${owner === null || owner === void 0 ? void 0 : owner.ssn_last4}` }), h(DetailItem, { title: "Line 1", value: (_a = owner === null || owner === void 0 ? void 0 : owner.address) === null || _a === void 0 ? void 0 : _a.line1 }), h(DetailItem, { title: "Line 2", value: (_b = owner === null || owner === void 0 ? void 0 : owner.address) === null || _b === void 0 ? void 0 : _b.line2 }), h(DetailItem, { title: "City", value: (_c = owner === null || owner === void 0 ? void 0 : owner.address) === null || _c === void 0 ? void 0 : _c.city }), h(DetailItem, { title: "State", value: (_d = owner === null || owner === void 0 ? void 0 : owner.address) === null || _d === void 0 ? void 0 : _d.state }), h(DetailItem, { title: "Zip", value: (_e = owner === null || owner === void 0 ? void 0 : owner.address) === null || _e === void 0 ? void 0 : _e.postal_code }))),
                ];
            })));
    }
}, [256, "owner-details", {
        "owners": [16]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["owner-details"];
    components.forEach(tagName => { switch (tagName) {
        case "owner-details":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, OwnerDetails);
            }
            break;
    } });
}
defineCustomElement();

export { OwnerDetails as O, defineCustomElement as d };
