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-Bj68P-7Q.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-CsVwnOtU.js";
import { t as chunkTextForOutbound } from "../../text-chunking-c6KsJm3e.js";
import "../../channel-status-CXxC_UdU.js";
import { s as resolveIMessageAccount } from "../../media-contract-CkD5_Fwm.js";
import { m as normalizeIMessageMessagingTarget, p as looksLikeIMessageTargetId } from "../../sanitize-outbound-j8bXSWbW.js";
import { n as resolveIMessageGroupToolPolicy, t as resolveIMessageGroupRequireMention } from "../../group-policy-7Q8p0o4c.js";
import "../../config-api-CpQN2CMT.js";
import { t as probeIMessage } from "../../probe-Cmya9txP.js";
import { n as sendMessageIMessage, t as monitorIMessageProvider } from "../../monitor-wX4vESv8.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 };
