"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSwapableAccounts = void 0;
const helpers_1 = require("@ledgerhq/coin-framework/account/helpers");
const react_1 = require("react");
const v5_1 = require("./v5");
function useSwapableAccounts({ accounts }) {
    const { data: currenciesFrom } = (0, v5_1.useFetchCurrencyFrom)();
    return (0, react_1.useMemo)(() => accounts.map(account => {
        return {
            ...account,
            disabled: !currenciesFrom?.includes((0, helpers_1.getAccountCurrency)(account).id),
        };
    }), [currenciesFrom, accounts]);
}
exports.useSwapableAccounts = useSwapableAccounts;
//# sourceMappingURL=useSwapableAccounts.js.map