'use strict';

var index = require('./index-p7cvUYAE.js');
var utils$1 = require('./utils-8RGQVADu.js');
var utils = require('./utils-CYONRFR6.js');
require('./parts-BXshb_S-.js');
require('./dinero-BwNN_k7x.js');

const AdditionalQuestionsDetails = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        if (!this.additionalQuestions || utils.isEmptyObject(this.additionalQuestions))
            return null;
        return (index.h("div", null, index.h(utils$1.DetailSectionTitle, { sectionTitle: "Additional Questions" }), index.h("div", { class: "d-flex flex-column gap-2 w-100 mt-3" }, index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.h(utils$1.DetailItem, { title: "Business Revenue", value: this.additionalQuestions.business_revenue }), index.h(utils$1.DetailItem, { title: "Business Payment Volume", value: this.additionalQuestions.business_payment_volume }))))));
    }
};

const CoreInfoDetails = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        if (!this.business) {
            return null;
        }
        return (index.h("div", null, index.h(utils$1.DetailSectionTitle, { sectionTitle: "Business Core Info Details" }), index.h("div", { class: "d-table gap-2 w-100 mt-3" }, index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.h(utils$1.DetailItem, { title: "Legal Name", value: this.business.legal_name }), index.h(utils$1.DetailItem, { title: "Doing Business As (DBA)", value: this.business.doing_business_as }), index.h(utils$1.DetailItem, { title: "Business Classification", value: utils.snakeCaseToHumanReadable(this.business.classification) }), index.h(utils$1.DetailItem, { title: "Industry", value: this.business.industry })), index.h("div", { class: "col-12 col-md-6" }, index.h(utils$1.DetailItem, { title: "Tax ID", value: this.business.tax_id }), index.h(utils$1.DetailItem, { title: "Website URL", value: this.business.website_url }), index.h(utils$1.DetailItem, { title: "Email Address", value: this.business.email }), index.h(utils$1.DetailItem, { title: "Phone Number", value: this.business.phone }))))));
    }
};

const LegalAddressDetails = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        var _a, _b, _c, _d, _e, _f, _g;
        if (!this.legalAddress || utils.isEmptyObject(this.legalAddress))
            return null;
        return (index.h("div", null, index.h(utils$1.DetailSectionTitle, { sectionTitle: "Business Legal Address Details" }), index.h("div", { class: "d-table gap-2 w-100 mt-3" }, index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.h(utils$1.DetailItem, { title: "Country", value: (_a = this.legalAddress) === null || _a === void 0 ? void 0 : _a.country }), index.h(utils$1.DetailItem, { title: "Legal Address", value: (_b = this.legalAddress) === null || _b === void 0 ? void 0 : _b.line1 }), index.h(utils$1.DetailItem, { title: "Address Line 2", value: (_c = this.legalAddress) === null || _c === void 0 ? void 0 : _c.line2 })), index.h("div", { class: "col-12 col-md-6" }, index.h(utils$1.DetailItem, { title: "City", value: (_d = this.legalAddress) === null || _d === void 0 ? void 0 : _d.city }), index.h(utils$1.DetailItem, { title: "State", value: (_e = this.legalAddress) === null || _e === void 0 ? void 0 : _e.state }), index.h(utils$1.DetailItem, { title: "Postal Code", value: (_g = (_f = this.legalAddress) === null || _f === void 0 ? void 0 : _f.postal_code) === null || _g === void 0 ? void 0 : _g.toString() }))))));
    }
};

const OwnerDetails = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    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 (index.h(index.Host, null, !!(this === null || this === void 0 ? void 0 : this.owners.length) &&
            this.owners.map((owner) => {
                var _a, _b, _c, _d, _e;
                return [
                    index.h(utils$1.DetailSectionTitle, { sectionTitle: `Owner ${owner === null || owner === void 0 ? void 0 : owner.name}'s Details` }),
                    index.h("div", { class: "d-flex flex-column gap-2 w-100 mt-3" }, index.h("div", { class: "col-md-6" }, index.h(utils$1.DetailItem, { title: "Name", value: owner === null || owner === void 0 ? void 0 : owner.name }), index.h(utils$1.DetailItem, { title: "Title", value: owner === null || owner === void 0 ? void 0 : owner.title }), index.h(utils$1.DetailItem, { title: "Email", value: owner === null || owner === void 0 ? void 0 : owner.email }), index.h(utils$1.DetailItem, { title: "Phone", value: owner === null || owner === void 0 ? void 0 : owner.phone }), index.h(utils$1.DetailItem, { title: "Date of Birth", value: utils.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))) }), index.h(utils$1.DetailItem, { title: "Identification Number", value: `********${owner === null || owner === void 0 ? void 0 : owner.ssn_last4}` }), index.h(utils$1.DetailItem, { title: "Line 1", value: (_a = owner === null || owner === void 0 ? void 0 : owner.address) === null || _a === void 0 ? void 0 : _a.line1 }), index.h(utils$1.DetailItem, { title: "Line 2", value: (_b = owner === null || owner === void 0 ? void 0 : owner.address) === null || _b === void 0 ? void 0 : _b.line2 }), index.h(utils$1.DetailItem, { title: "City", value: (_c = owner === null || owner === void 0 ? void 0 : owner.address) === null || _c === void 0 ? void 0 : _c.city }), index.h(utils$1.DetailItem, { title: "State", value: (_d = owner === null || owner === void 0 ? void 0 : owner.address) === null || _d === void 0 ? void 0 : _d.state }), index.h(utils$1.DetailItem, { title: "Zip", value: (_e = owner === null || owner === void 0 ? void 0 : owner.address) === null || _e === void 0 ? void 0 : _e.postal_code }))),
                ];
            })));
    }
};

const RepresentativeDetails = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    render() {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
        if (!this.representative || utils.isEmptyObject(this.representative))
            return null;
        return (index.h("div", null, index.h(utils$1.DetailSectionTitle, { sectionTitle: "Representative Details" }), index.h("div", { class: "d-flex flex-column gap-2 w-100 mt-3" }, index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.h(utils$1.DetailItem, { title: "Name", value: (_a = this.representative) === null || _a === void 0 ? void 0 : _a.name }), index.h(utils$1.DetailItem, { title: "ID", value: (_b = this.representative) === null || _b === void 0 ? void 0 : _b.id }), index.h(utils$1.DetailItem, { title: "Address", value: (_d = (_c = this.representative) === null || _c === void 0 ? void 0 : _c.address) === null || _d === void 0 ? void 0 : _d.line1 }), index.h(utils$1.DetailItem, { title: "Created At", value: ((_e = this.representative) === null || _e === void 0 ? void 0 : _e.created_at) && utils.formatMediumDate((_f = this.representative) === null || _f === void 0 ? void 0 : _f.created_at) })), index.h("div", { class: "col-12 col-md-6" }, index.h(utils$1.DetailItem, { title: "Title", value: (_g = this.representative) === null || _g === void 0 ? void 0 : _g.title }), index.h(utils$1.DetailItem, { title: "Is Owner?", value: (_h = this.representative) === null || _h === void 0 ? void 0 : _h.is_owner.toString() }), index.h(utils$1.DetailItem, { title: "Date Of Birth", value: this.representative && utils.formatMediumDate(new Date(Number((_j = this.representative) === null || _j === void 0 ? void 0 : _j.dob_year), Number((_k = this.representative) === null || _k === void 0 ? void 0 : _k.dob_month) - 1, Number((_l = this.representative) === null || _l === void 0 ? void 0 : _l.dob_day))) }), index.h(utils$1.DetailItem, { title: "Email", value: (_m = this.representative) === null || _m === void 0 ? void 0 : _m.email }), index.h(utils$1.DetailItem, { title: "Phone", value: (_o = this.representative) === null || _o === void 0 ? void 0 : _o.phone }), index.h(utils$1.DetailItem, { title: "Updated At", value: this.representative && utils.formatMediumDate((_p = this.representative) === null || _p === void 0 ? void 0 : _p.updated_at) }))))));
    }
};

exports.additional_questions_details = AdditionalQuestionsDetails;
exports.core_info_details = CoreInfoDetails;
exports.legal_address_details = LegalAddressDetails;
exports.owner_details = OwnerDetails;
exports.representative_details = RepresentativeDetails;
