import {
  afterEach,
  describe,
  globalExpect,
  init_dist,
  it
} from "../../chunk-D6N3USMR.mjs";
import {
  BlindPay,
  init_client
} from "../../chunk-VWWGGMMT.mjs";
import "../../chunk-FG25JHDX.mjs";
import "../../chunk-KMU6V4LW.mjs";
import "../../chunk-QGNLMN6Z.mjs";
import "../../chunk-ISHZTBAN.mjs";
import "../../chunk-UDRMLZWT.mjs";
import "../../chunk-LEPGLH7Q.mjs";
import "../../chunk-UC57SCKQ.mjs";
import "../../chunk-E7M4CJKR.mjs";
import "../../chunk-F5Z45GCA.mjs";
import "../../chunk-TBTA7A2P.mjs";
import "../../chunk-YIZJM2GU.mjs";
import "../../chunk-Z6EYX4D3.mjs";
import "../../chunk-ALHMJWQN.mjs";
import "../../chunk-B5T7AQLH.mjs";
import "../../chunk-RC5NN5UF.mjs";
import "../../chunk-VGU72ZNI.mjs";
import "../../chunk-LRHWT4JU.mjs";
import "../../chunk-WE73MTQL.mjs";
import "../../chunk-UOAM7SX3.mjs";
import {
  __async,
  __commonJS
} from "../../chunk-OBKEW4AQ.mjs";

// src/resources/partner-fees/partner-fees.test.ts
var require_partner_fees_test = __commonJS({
  "src/resources/partner-fees/partner-fees.test.ts"(exports) {
    init_dist();
    init_client();
    describe("Partner fees", () => {
      afterEach(() => fetchMock.resetMocks());
      const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
      describe("List partner fees", () => {
        it("should list partner fees", () => __async(null, null, function* () {
          const mockedList = [
            {
              id: "fe_000000000000",
              instance_id: "in_000000000000",
              name: "Display Name",
              payout_percentage_fee: 0,
              payout_flat_fee: 0,
              payin_percentage_fee: 0,
              payin_flat_fee: 0,
              evm_wallet_address: "0x1234567890123456789012345678901234567890",
              stellar_wallet_address: "GAB22222222222222222222222222222222222222222222222222222222222222"
            }
          ];
          fetchMock.mockResponseOnce(JSON.stringify(mockedList), {
            headers: { "Content-Type": "application/json" }
          });
          const { data, error } = yield blindpay.partnerFees.list();
          globalExpect(error).toBeNull();
          globalExpect(data).toEqual(mockedList);
        }));
      });
      describe("Create partner fee", () => {
        it("should create a partner fee", () => __async(null, null, function* () {
          const mockPartnerFee = {
            id: "fe_000000000000",
            instance_id: "in_000000000000",
            name: "Display Name",
            payout_percentage_fee: 0,
            payout_flat_fee: 0,
            payin_percentage_fee: 0,
            payin_flat_fee: 0,
            evm_wallet_address: "0x1234567890123456789012345678901234567890",
            stellar_wallet_address: "GAB22222222222222222222222222222222222222222222222222222222222222"
          };
          fetchMock.mockResponseOnce(JSON.stringify(mockPartnerFee), {
            headers: { "Content-Type": "application/json" }
          });
          const { data, error } = yield blindpay.partnerFees.create({
            name: "Display Name",
            payout_percentage_fee: 0,
            payout_flat_fee: 0,
            payin_percentage_fee: 0,
            payin_flat_fee: 0,
            evm_wallet_address: "0x1234567890123456789012345678901234567890",
            stellar_wallet_address: "GAB22222222222222222222222222222222222222222222222222222222222222"
          });
          globalExpect(error).toBeNull();
          globalExpect(data).toEqual(mockPartnerFee);
        }));
      });
      describe("Get partner fee", () => {
        it("should get a partner fee", () => __async(null, null, function* () {
          const mockedFee = {
            id: "fe_000000000000",
            instance_id: "in_000000000000",
            name: "Display Name",
            payout_percentage_fee: 0,
            payout_flat_fee: 0,
            payin_percentage_fee: 0,
            payin_flat_fee: 0,
            evm_wallet_address: "0x1234567890123456789012345678901234567890",
            stellar_wallet_address: "GAB22222222222222222222222222222222222222222222222222222222222222"
          };
          fetchMock.mockResponseOnce(JSON.stringify(mockedFee), {
            headers: { "Content-Type": "application/json" }
          });
          const { data, error } = yield blindpay.partnerFees.get("fe_000000000000");
          globalExpect(error).toBeNull();
          globalExpect(data).toEqual(mockedFee);
        }));
      });
      describe("Delete partner fee", () => {
        it("should delete a partner fee", () => __async(null, null, function* () {
          fetchMock.mockResponseOnce(JSON.stringify({ data: null }), {
            headers: { "Content-Type": "application/json" }
          });
          const { data, error } = yield blindpay.partnerFees.delete("fe_000000000000");
          globalExpect(error).toBeNull();
          globalExpect(data).toEqual({ data: null });
        }));
      });
    });
  }
});
export default require_partner_fees_test();
