import { ChannelAdapter, NotifyEvent, RenderedMessage } from "./index.js";
import { MailMessage, MailResult } from "@platform-modules/mail";
//#region src/email.d.ts
type EmailRecipient = {
  to: string;
  from: string;
  replyTo?: string;
  /** Used when rendered.subject is absent. */
  subjectFallback?: string;
  idempotencyKey?: string;
};
type EmailChannelOpts = {
  mapMessage?: (rendered: RenderedMessage, recipient: EmailRecipient, event?: NotifyEvent) => MailMessage;
};
type MailSend = (msg: MailMessage) => Promise<MailResult>;
/** Thin bridge — delegates send to `@platform-modules/mail`, does not re-implement. */
declare function createEmailChannel(mail: {
  send: MailSend;
}, opts?: EmailChannelOpts): ChannelAdapter;
//#endregion
export { EmailChannelOpts, EmailRecipient, MailSend, createEmailChannel };