import { defaultSignatureData as e, zeroAddress as t } from "../../constants/protocol.constants.mjs";
import { defaultHookData as n } from "../../types/circom-data.types.mjs";
import { getExternalActionIdHash as r } from "../utils/external-action.utils.mjs";
import { getOriginalSender as i } from "./getOriginalSender.mjs";
//#region libs/shared/common/src/functions/snarkjs/generateCircomData.ts
var a = (a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D = e, O) => {
	let k = structuredClone(w);
	return "interactionAddress" in k && delete k.interactionAddress, {
		rootHashHinkal: s,
		erc20TokenAddresses: u,
		tokenIds: y.map((e) => String(e)),
		amountChanges: l,
		inputNullifiers: o,
		outCommitments: a,
		encryptedOutputs: f,
		timeStamp: d.length > 0 ? d[0][0].timeStamp : String(C ?? ""),
		stealthAddressStructure: b,
		rootHashAccessToken: c,
		relay: _,
		externalAddress: h === void 0 ? t : h,
		externalActionMetadata: g,
		externalActionId: typeof m == "bigint" ? 0n : r(m),
		hookData: S || n,
		publicSignalCount: p,
		calldataHash: v,
		onChainCreation: x,
		slippageValues: T,
		hinkalLogicArgs: k,
		feeStructure: { ...E },
		signatureData: D,
		originalSender: O ?? i(h ?? t, _)
	};
};
//#endregion
export { a as generateCircomData };
