"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterPlatformAccounts = void 0;
const minimatch_1 = require("minimatch");
function filterPlatformAccounts(accounts, filters) {
    const filterCurrencyRegexes = filters.currencies
        ? filters.currencies.map(filter => (0, minimatch_1.makeRe)(filter))
        : null;
    return accounts.filter(account => {
        if (filterCurrencyRegexes &&
            !filterCurrencyRegexes.some(regex => account.currency.match(regex))) {
            return false;
        }
        return true;
    });
}
exports.filterPlatformAccounts = filterPlatformAccounts;
//# sourceMappingURL=filters.js.map