import {
  afterEach,
  describe,
  globalExpect,
  init_dist,
  it
} from "../../chunk-GCCHFONX.mjs";
import {
  BlindPay,
  init_client
} from "../../chunk-ZPGWM4VJ.mjs";
import "../../chunk-IZYPRCCV.mjs";
import "../../chunk-QGNLMN6Z.mjs";
import "../../chunk-UC57SCKQ.mjs";
import "../../chunk-TBTA7A2P.mjs";
import "../../chunk-BONN6PYB.mjs";
import "../../chunk-5XJJKYXE.mjs";
import "../../chunk-RC5NN5UF.mjs";
import "../../chunk-W7NJUABI.mjs";
import "../../chunk-E7M4CJKR.mjs";
import "../../chunk-3QQCDR3E.mjs";
import "../../chunk-LRHWT4JU.mjs";
import "../../chunk-QHMIK7U3.mjs";
import "../../chunk-64EFLUS3.mjs";
import "../../chunk-B5T7AQLH.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();
