import type { PulseRow } from './db.js';

/**
 * Fired when an admin promotes a pulse from draft → open. Today this is a
 * console.log stub; the integration (transactional email or Slack webhook)
 * lands in a later phase. The call site stays the same once wired up — only
 * this function body changes.
 *
 * TODO: replace with the production notifier when chosen. Likely options:
 *  - Postmark / Resend transactional email to all CAB members
 *  - Slack webhook to a council-only channel
 */
export function notifyPulseOpened(pulse: PulseRow): void {
  // eslint-disable-next-line no-console
  console.log(`[notify] pulse opened: "${pulse.question}" — closes ${pulse.closes_at}`);
}
