import { Jr as saveMediaBuffer } from "./model-auth-DB8p68Tu.js";
import { a as loadWebMedia } from "./ir-BBAuo77p.js";
import { t as buildOutboundMediaLoadOptions } from "./load-options-94NHAbaC.js";
//#region src/media/outbound-attachment.ts
async function resolveOutboundAttachmentFromUrl(mediaUrl, maxBytes, options) {
	const media = await loadWebMedia(mediaUrl, buildOutboundMediaLoadOptions({
		maxBytes,
		mediaLocalRoots: options?.localRoots
	}));
	const saved = await saveMediaBuffer(media.buffer, media.contentType ?? void 0, "outbound", maxBytes);
	return {
		path: saved.path,
		contentType: saved.contentType
	};
}
//#endregion
export { resolveOutboundAttachmentFromUrl as t };
