import { t as DEFAULT_ACCOUNT_ID } from "../../account-id-9f7Emvg2.js";
import { r as buildChannelConfigSchema } from "../../config-schema-B0WZzMYc.js";
import { p as formatTrimmedAllowFromEntries } from "../../channel-config-helpers-BwWCMN6R.js";
import { c as getChatChannelMeta } from "../../core-COG71X3q.js";
import { t as createPluginRuntimeStore } from "../../runtime-store-CmzsUY8m.js";
import { a as resolveChannelMediaMaxBytes } from "../../media-runtime-uL9i3jCm.js";
import { t as chunkTextForOutbound } from "../../text-chunking-DiM5GGbd.js";
import { t as PAIRING_APPROVED_MESSAGE } from "../../pairing-message-DmQJmPMh.js";
import { c as collectStatusIssuesFromLastError, r as buildComputedAccountStatusSnapshot } from "../../status-helpers-sfm9OlI3.js";
import "../../channel-status-CCcQQRo-.js";
import { i as IMessageConfigSchema } from "../../bundled-channel-config-schema-CNcmW4qn.js";
import { i as resolveIMessageAccount } from "../../accounts-BJYKCQPd.js";
import { t as probeIMessage } from "../../probe-Dq0caZNR.js";
import { n as resolveIMessageGroupToolPolicy, r as imessageMessageActions, t as resolveIMessageGroupRequireMention } from "../../group-policy-Hz2mVpVz.js";
import { o as looksLikeIMessageTargetId, s as normalizeIMessageMessagingTarget } from "../../sanitize-outbound-BYmw3Kt7.js";
import "../../config-api-C58m8Opz.js";
import { n as sendMessageIMessage, t as monitorIMessageProvider } from "../../monitor-VBqd39Je.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 };
