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-Ze4Jtkrv.js";
import { p as formatTrimmedAllowFromEntries } from "../../channel-config-helpers-raFU1TQR.js";
import { c as getChatChannelMeta } from "../../core-BGKnUGqk.js";
import { t as createPluginRuntimeStore } from "../../runtime-store-BNbEwkxm.js";
import { t as resolveChannelMediaMaxBytes } from "../../media-limits-BNQUYAs4.js";
import { t as PAIRING_APPROVED_MESSAGE } from "../../pairing-message-DUoUjOds.js";
import { c as collectStatusIssuesFromLastError, r as buildComputedAccountStatusSnapshot } from "../../status-helpers-DB24CIDP.js";
import "../../media-runtime-Cux9gLku.js";
import { t as chunkTextForOutbound } from "../../text-chunking-c6KsJm3e.js";
import "../../channel-status-CXxC_UdU.js";
import { s as resolveIMessageAccount } from "../../media-contract-C8JECjWt.js";
import { m as normalizeIMessageMessagingTarget, p as looksLikeIMessageTargetId } from "../../sanitize-outbound-Ciw4y7R5.js";
import { n as resolveIMessageGroupToolPolicy, t as resolveIMessageGroupRequireMention } from "../../group-policy-C-_tu5ib.js";
import "../../config-api-CpQN2CMT.js";
import { t as probeIMessage } from "../../probe-CWEmT-I2.js";
import { n as sendMessageIMessage, t as monitorIMessageProvider } from "../../monitor-BM_n8PN6.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 };
