import { t as DEFAULT_ACCOUNT_ID } from "../../account-id-BcgJyVVC.js";
import { i as IMessageConfigSchema } from "../../zod-schema.providers-whatsapp-CFLRKQGr.js";
import { r as buildChannelConfigSchema } from "../../config-schema-DJTEV0RJ.js";
import { p as formatTrimmedAllowFromEntries } from "../../channel-config-helpers-QlSIwn0c.js";
import { c as getChatChannelMeta } from "../../core-CGYjsMSS.js";
import { t as createPluginRuntimeStore } from "../../runtime-store-7sm4RoFT.js";
import { t as resolveChannelMediaMaxBytes } from "../../media-limits-DUq8kRVx.js";
import { t as PAIRING_APPROVED_MESSAGE } from "../../pairing-message-HB5GJ-uj.js";
import { c as collectStatusIssuesFromLastError, r as buildComputedAccountStatusSnapshot } from "../../status-helpers-CVO-hmZl.js";
import "../../media-runtime-x4Y3XH4e.js";
import { t as chunkTextForOutbound } from "../../text-chunking-BG3I-zoa.js";
import "../../channel-status-p56qDx5D.js";
import { s as resolveIMessageAccount } from "../../media-contract-nfYTFUVd.js";
import { m as normalizeIMessageMessagingTarget, p as looksLikeIMessageTargetId } from "../../sanitize-outbound-vC4q8EHz.js";
import { n as resolveIMessageGroupToolPolicy, t as resolveIMessageGroupRequireMention } from "../../group-policy-BJ354f4_.js";
import "../../config-api-B8k1L4m9.js";
import { t as probeIMessage } from "../../probe-C3p4mv0n.js";
import { n as sendMessageIMessage, t as monitorIMessageProvider } from "../../monitor-D0d6Uhqf.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, looksLikeIMessageTargetId, monitorIMessageProvider, normalizeIMessageMessagingTarget, probeIMessage, resolveChannelMediaMaxBytes, resolveIMessageConfigAllowFrom, resolveIMessageConfigDefaultTo, resolveIMessageGroupRequireMention, resolveIMessageGroupToolPolicy, sendMessageIMessage, setIMessageRuntime };
