"use client";
import { R as n, g as o } from "./fetcher-D4o2k9tU.js";
function b(i, e, s, r, u, t) {
  const {
    isCompleted: f,
    inProgress: E,
    isExpired: R,
    isReverted: l,
    isRefunded: d,
    isRefunding: g
  } = o(i);
  return E ? e.subTitle.inProgress({
    chainName: u,
    tokenSymbol: s.token.symbol
  }, {
    chainName: t,
    tokenSymbol: r.token.symbol
  }) : f ? e.subTitle.isCompleted(t) : R ? e.subTitle.isExpired : l ? e.subTitle.isReverted : d ? e.subTitle.isRefunded : g ? e.subTitle.isRefunding : e.subTitle.isPending;
}
function m(i, e, s, r) {
  const {
    isPending: u,
    isCompleted: t,
    inProgress: f,
    isExpired: E,
    isReverted: R,
    isRefunded: l,
    isRefunding: d
  } = o(i);
  if (E) return e.title.isExpired;
  if (u) return e.title.isPending;
  if (f) return e.title.inProgress(s, r);
  if (t) return e.title.isCompleted(s);
  if (R) return e.title.isReverted;
  if (l) return e.title.isRefunded;
  if (d) return e.title.isRefunding;
}
function D(i) {
  let e = i?.status, s = i?.statusCode;
  return i?.statusCode === n.REFUND_PENDING && (i?.status === "REFUNDED" && (e = "REFUNDED", s = n.REFUNDED), i?.status === "REFUND_PENDING" && (e = "REFUND_PENDING", s = n.REFUND_PENDING), i?.status === "REVERTED" && (e = "REVERTED", s = n.REVERTED)), {
    ...i,
    status: e,
    statusCode: s
  };
}
export {
  b as a,
  m as g,
  D as n
};
//# sourceMappingURL=utils-Cfv96A32.js.map
