import {
  afterEach,
  describe,
  globalExpect,
  init_dist,
  it
} from "../../chunk-GCCHFONX.mjs";
import {
  Blindpay,
  init_client
} from "../../chunk-ES7RXEM7.mjs";
import "../../chunk-GEDDLCJY.mjs";
import "../../chunk-LK3JPQ6I.mjs";
import "../../chunk-CNNEROQ7.mjs";
import "../../chunk-GNDAATIJ.mjs";
import "../../chunk-VKN2AMCW.mjs";
import "../../chunk-LUDGZPXY.mjs";
import "../../chunk-3CZJEDS5.mjs";
import "../../chunk-UCAW3RTZ.mjs";
import "../../chunk-M6IYYMRW.mjs";
import "../../chunk-HKFAJXJG.mjs";
import "../../chunk-QVOSGLUO.mjs";
import "../../chunk-2DAKB5XK.mjs";
import "../../chunk-QHMIK7U3.mjs";
import "../../chunk-LLWEHHKB.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("test-key");
      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({
            instanceId: "in_000000000000"
          });
          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({
            instanceId: "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"
          });
          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({
            instanceId: "in_000000000000",
            id: "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({
            instanceId: "in_000000000000",
            id: "fe_000000000000"
          });
          globalExpect(error).toBeNull();
          globalExpect(data).toEqual({ data: null });
        }));
      });
    });
  }
});
export default require_partner_fees_test();
