export { e as escapeHtml } from './security-DMUNYqQI.js';

/**
 * Shared email template types.
 *
 * All apps provide a BrandingConfig to customize the look & feel
 * while keeping structure, security, and accessibility consistent.
 */
/** Branding configuration — each app provides one of these. */
interface EmailBranding {
    /** App display name (e.g. "OpenSourceSports") */
    appName: string;
    /** Full URL to app logo (optional — falls back to text-only header) */
    logoUrl?: string;
    /** Primary brand color as hex (e.g. "#0d9488") */
    primaryColor: string;
    /** Gradient start color (defaults to primaryColor) */
    gradientFrom?: string;
    /** Gradient end color (defaults to a darker shade) */
    gradientTo?: string;
    /** Accent color for callout boxes (defaults to primaryColor) */
    accentColor?: string;
    /** Sender email address */
    fromEmail: string;
    /** Support/reply-to email (optional) */
    supportEmail?: string;
    /** App base URL (e.g. "https://opensourcesports.io") */
    baseUrl: string;
    /** Preferences/unsubscribe URL (optional) */
    preferencesUrl?: string;
    /** Footer tagline (e.g. "A Digi Logic Labs project") */
    footerText?: string;
}
/** CTA button configuration. */
interface EmailCTA {
    text: string;
    url: string;
}
/** A step in a numbered list (for onboarding emails). */
interface EmailStep {
    title: string;
    description: string;
}
/** A stat card for digest/summary emails. */
interface EmailStat {
    label: string;
    value: string | number;
}
/** A table row for data-rich emails. */
interface EmailTableRow {
    cells: string[];
}
/** Layout options for the base email wrapper. */
interface EmailLayoutOptions {
    /** Email subject line */
    subject: string;
    /** Preheader text (shows in inbox preview, hidden in body) */
    preheader?: string;
    /** Emoji or text icon shown before the header title */
    icon?: string;
    /** Header subtitle (smaller text below title) */
    subtitle?: string;
    /** Main HTML body content (between header and footer) */
    body: string;
    /** CTA button (optional) */
    cta?: EmailCTA;
    /** Additional footer links */
    footerLinks?: {
        label: string;
        url: string;
    }[];
}
/** Return type for all email template functions. */
interface EmailOutput {
    subject: string;
    html: string;
    text: string;
}

/**
 * Base email layout builder.
 *
 * Generates a fully responsive, email-client-compatible HTML email
 * using only inline styles and table-based layout.
 *
 * Every user-facing string in the layout is pre-escaped. Template functions
 * that accept user input MUST escape those values before passing them to body.
 */

/**
 * Build a complete HTML email from branding + layout options.
 *
 * Returns `{ subject, html, text }` ready to pass to any IEmail adapter.
 */
declare function emailLayout(branding: EmailBranding, options: EmailLayoutOptions): EmailOutput;
/** Highlighted callout box with colored left border. */
declare function calloutBlock(content: string, color?: string): string;
/** Numbered step card (for onboarding sequences). */
declare function stepBlock(number: number, title: string, description: string, color?: string): string;
/** Stats bar — row of metric cards. */
declare function statsBar(stats: {
    label: string;
    value: string | number;
}[]): string;
/** Simple data table with header row. */
declare function dataTable(headers: string[], rows: string[][]): string;
/** Info/tip box with icon. */
declare function tipBlock(content: string, icon?: string): string;
/** Centered heading within email body. */
declare function sectionHeading(text: string): string;
/** Horizontal rule divider. */
declare function divider(): string;

/**
 * Pre-built email templates.
 *
 * Each template accepts branding + template-specific data, composes the
 * layout + building blocks, and returns { subject, html, text }.
 *
 * Apps call these directly — no need to touch layout internals.
 * All user-provided strings are escaped internally.
 */

interface WelcomeEmailData {
    /** User's display name */
    userName: string;
    /** URL to their dashboard or profile */
    dashboardUrl: string;
    /** Onboarding steps (typically 3) */
    steps: EmailStep[];
    /** Optional pro-tip text */
    tip?: string;
}
declare function welcomeEmail(branding: EmailBranding, data: WelcomeEmailData): EmailOutput;
interface DigestEmailData {
    /** Recipient display name */
    recipientName: string;
    /** Period label (e.g. "This Week", "March 2026") */
    period: string;
    /** Summary stats shown in the stats bar */
    stats: EmailStat[];
    /** Main body HTML (app-specific content — must be pre-escaped) */
    contentHtml: string;
    /** Optional: URL to view full report */
    reportUrl?: string;
    /** Optional: why they're receiving this */
    subscriptionNote?: string;
}
declare function digestEmail(branding: EmailBranding, data: DigestEmailData): EmailOutput;
interface NotificationEmailData {
    /** Recipient display name */
    recipientName: string;
    /** Notification headline */
    headline: string;
    /** Main message body (HTML-safe — will be escaped) */
    message: string;
    /** Optional highlighted detail block */
    detail?: string;
    /** Optional CTA */
    actionUrl?: string;
    /** Optional CTA label (defaults to "View Details") */
    actionText?: string;
}
declare function notificationEmail(branding: EmailBranding, data: NotificationEmailData): EmailOutput;
type ModerationAction = "warning" | "suspension" | "ban" | "reinstatement";
interface ModerationEmailData {
    /** User display name */
    userName: string;
    /** Type of moderation action */
    action: ModerationAction;
    /** Reason for the action */
    reason: string;
    /** What the user should do next (optional) */
    nextSteps?: string;
    /** Appeal/support URL (optional) */
    appealUrl?: string;
}
declare function moderationEmail(branding: EmailBranding, data: ModerationEmailData): EmailOutput;
interface TransactionEmailData {
    /** Recipient display name */
    recipientName: string;
    /** Transaction headline (e.g. "Payment Received", "Order Confirmed") */
    headline: string;
    /** Line items: [label, value] pairs */
    lineItems: [string, string][];
    /** Total amount string (e.g. "$25.00") */
    total?: string;
    /** Optional message above the table */
    message?: string;
    /** Optional receipt/order URL */
    receiptUrl?: string;
}
declare function transactionEmail(branding: EmailBranding, data: TransactionEmailData): EmailOutput;
interface SecurityEmailData {
    /** User display name */
    userName: string;
    /** What happened (e.g. "Password Changed", "New Login Detected") */
    event: string;
    /** Details about the event */
    details: string;
    /** Optional action URL (e.g. reset password link) */
    actionUrl?: string;
    /** Optional action label */
    actionText?: string;
    /** Expiry note (e.g. "This link expires in 1 hour") */
    expiryNote?: string;
}
declare function securityEmail(branding: EmailBranding, data: SecurityEmailData): EmailOutput;

export { type DigestEmailData, type EmailBranding, type EmailCTA, type EmailLayoutOptions, type EmailOutput, type EmailStat, type EmailStep, type EmailTableRow, type ModerationAction, type ModerationEmailData, type NotificationEmailData, type SecurityEmailData, type TransactionEmailData, type WelcomeEmailData, calloutBlock, dataTable, digestEmail, divider, emailLayout, moderationEmail, notificationEmail, sectionHeading, securityEmail, statsBar, stepBlock, tipBlock, transactionEmail, welcomeEmail };
