import { GetExecutionStatusResponse as t } from "@defuse-protocol/one-click-sdk-typescript";
import "react";
import { b as m } from "../../config-D-Ik_SSx.js";
import "../../constants/chains.js";
import "@tanstack/react-query";
import "../../constants/aurora-assets.js";
import "../../utils/feeServiceTokens.js";
import "../../logger.js";
import "@scure/base";
import "zod";
import "../../utils/near/rpc.js";
import "ethers";
import "../../machine/machine.js";
import "../../index-DEq3oXQF.js";
import "@defuse-protocol/intents-sdk";
import "change-case";
import "../../localstorage-DVS0q1yC.js";
import "@defuse-protocol/internal-utils";
import "bs58";
import "axios";
import "../../network.js";
import "@ton/core";
import "../../utils/cn.js";
import "../../hooks/useMakeNearTransfer/nearClient.js";
import { useOneClickExecutionStatus as n } from "../../hooks/useOneClickExecutionStatus.js";
const c = (o) => {
  switch (o) {
    case t.status.SUCCESS:
      return "SUCCESS";
    case t.status.FAILED:
      return "FAILED";
    case t.status.REFUNDED:
      return "REFUNDED";
    case t.status.PROCESSING:
    case t.status.KNOWN_DEPOSIT_TX:
      return "PROCESSING";
    case t.status.PENDING_DEPOSIT:
      return "PENDING";
    case t.status.INCOMPLETE_DEPOSIT:
      return "WAITING_FOR_FUNDS";
    default:
      return "PENDING";
  }
}, v = (o, p) => {
  const { ctx: s } = m(), { isOneClickDeposit: r } = o, e = r && s.quote && !s.quote.dry, u = e ? s.quote.depositAddress : void 0, a = e ? s.quote.depositMemo : void 0, { data: i } = n({
    depositAddress: u,
    depositMemo: a,
    disabled: p?.disabled
  });
  return r ? i ? c(i.status) : "PENDING" : "SUCCESS";
};
export {
  v as useTransferResultStatus
};
//# sourceMappingURL=useTransferResultStatus.js.map
