import { r as registerInstance, h } from './index-CV0Pyo1O.js';
import { J as JustifiAnalytics } from './Analytics-C76Y5Pqf.js';
import { c as checkPkgVersion } from './check-pkg-version-D5BxTNyL.js';
import { w as waitForConfig } from './config-state-kKn89dp1.js';
import { S as StyledHost } from './styled-host-D84RBv1W.js';
import './event-types-CZfYo5-1.js';
import './package-CqcLgdsl.js';
import './Api-BulOmiMS.js';
import './utils-C25uIOK0.js';
import './dinero-HXpYMWUU.js';
import './Plaid-DxSkT8pY.js';
import './Pagination-CLHwhyvu.js';
import './Business-BcNb9bVO.js';
import './index-cDVGjRkU.js';

const JustifiCardForm = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
    }
    async componentWillLoad() {
        await waitForConfig();
        checkPkgVersion();
        this.analytics = new JustifiAnalytics(this);
    }
    disconnectedCallback() {
        var _a;
        (_a = this.analytics) === null || _a === void 0 ? void 0 : _a.cleanup();
    }
    async validate() {
        return this.cardFormElement.validate();
    }
    async tokenize({ clientId, paymentMethodMetadata, account, }) {
        return this.cardFormElement.tokenize({ clientId, paymentMethodMetadata, account });
    }
    render() {
        return (h(StyledHost, { key: 'e8591312a00d22c68812fda0b56a125ffd763e01' }, h("card-form", { key: 'e987ea9f3bcd2bf0aa8b2c6749bff3b902f20519', ref: (el) => (this.cardFormElement = el) })));
    }
};

export { JustifiCardForm as justifi_card_form };
