import {
  prepareAddress
} from "./chunk-EPYLVGTG.mjs";

// src/sdk/common/utils/prepare-addresses.ts
function prepareAddresses(data, ...keys) {
  const result = {
    ...data
  };
  for (const key of keys) {
    if (!result[key]) {
      continue;
    }
    try {
      if (Array.isArray(result[key])) {
        const addresses = result[key].map((item) => {
          let result2 = item;
          if (item) {
            const address = prepareAddress(item);
            if (address) {
              result2 = address;
            }
          }
          return result2;
        });
        result[key] = addresses;
      } else {
        const address = prepareAddress(result[key]);
        if (address) {
          result[key] = address;
        }
      }
    } catch (err) {
    }
  }
  return result;
}

export {
  prepareAddresses
};
//# sourceMappingURL=chunk-KY5BS7VC.mjs.map