import { getIntentsAccountTypeFromAddress as e } from "../chains/getIntentsAccountTypeFromAddress.js";
import { getIntentsAccountId as f } from "./getIntentsAccountId.js";
import { isAuroraRecipient as m } from "./isAuroraRecipient.js";
import { isAuroraSourceRefund as p } from "./isAuroraSourceRefund.js";
import { isAuroraToken as s } from "./isAuroraToken.js";
import { supportsAuroraVcRefund as d } from "./supportsAuroraVcRefund.js";
const h = ({
  walletAddress: r,
  sourceToken: t,
  targetToken: n,
  intentsAccountType: i,
  supportedChains: u,
  defaultRefundTo: c
}) => {
  if (m(n))
    return d({ sourceToken: t, targetToken: n }) ? "aurora" : r;
  if (p({ sourceToken: t, targetToken: n }))
    return "aurora";
  const o = f({
    addressType: e(r) ?? i,
    walletAddress: r
  });
  return !!o && (t.isIntent || s(t) || !u.includes(t.blockchain)) ? o : c;
};
export {
  h as getQuoteRefundTo
};
//# sourceMappingURL=getQuoteRefundTo.js.map
