import { t as DEFAULT_ACCOUNT_ID } from "../../account-id-B32J-iNN.js";
import { r as buildChannelConfigSchema } from "../../config-schema-CpJ4LFf2.js";
import { p as formatTrimmedAllowFromEntries } from "../../channel-config-helpers-CQb9YOAn.js";
import { c as getChatChannelMeta } from "../../core-DC7Ny2oO.js";
import { t as createPluginRuntimeStore } from "../../runtime-store-BSkCngaf.js";
import { a as resolveChannelMediaMaxBytes } from "../../media-runtime-CPXTkSQr.js";
import { t as chunkTextForOutbound } from "../../text-chunking-ObhJDe8L.js";
import { t as PAIRING_APPROVED_MESSAGE } from "../../pairing-message-DUsvXiNR.js";
import { c as collectStatusIssuesFromLastError, r as buildComputedAccountStatusSnapshot } from "../../status-helpers-nyf_mfYa.js";
import "../../channel-status-1yY-1IXP.js";
import { i as IMessageConfigSchema } from "../../bundled-channel-config-schema-C65cOOX-.js";
import { i as resolveIMessageAccount } from "../../accounts-DteRRvB9.js";
import { t as probeIMessage } from "../../probe-NEDMTmie.js";
import { n as resolveIMessageGroupToolPolicy, r as imessageMessageActions, t as resolveIMessageGroupRequireMention } from "../../group-policy-n10OqJ9H.js";
import { o as looksLikeIMessageTargetId, s as normalizeIMessageMessagingTarget } from "../../sanitize-outbound-DS3EW4FZ.js";
import "../../config-api-Cp0Q2X18.js";
import { n as sendMessageIMessage, t as monitorIMessageProvider } from "../../monitor-Db2Zsmky.js";
//#region extensions/imessage/src/config-accessors.ts
function resolveIMessageConfigAllowFrom(params) {
	return (resolveIMessageAccount(params).config.allowFrom ?? []).map((entry) => String(entry));
}
function resolveIMessageConfigDefaultTo(params) {
	const defaultTo = resolveIMessageAccount(params).config.defaultTo;
	if (defaultTo == null) return;
	return defaultTo.trim() || void 0;
}
//#endregion
//#region extensions/imessage/src/runtime.ts
const { setRuntime: setIMessageRuntime } = createPluginRuntimeStore({
	pluginId: "imessage",
	errorMessage: "iMessage runtime not initialized"
});
//#endregion
export { DEFAULT_ACCOUNT_ID, IMessageConfigSchema, PAIRING_APPROVED_MESSAGE, buildChannelConfigSchema, buildComputedAccountStatusSnapshot, chunkTextForOutbound, collectStatusIssuesFromLastError, formatTrimmedAllowFromEntries, getChatChannelMeta, imessageMessageActions, looksLikeIMessageTargetId, monitorIMessageProvider, normalizeIMessageMessagingTarget, probeIMessage, resolveChannelMediaMaxBytes, resolveIMessageConfigAllowFrom, resolveIMessageConfigDefaultTo, resolveIMessageGroupRequireMention, resolveIMessageGroupToolPolicy, sendMessageIMessage, setIMessageRuntime };
