/**
 * Site email resource.
 *
 * fetchEmailStatus reads stored state and the cached sender list; it never
 * reaches Brevo. sendTestEmail and refreshSenders both exist to serve an
 * explicit button press, which is the only thing that justifies the call.
 */

import { get, post } from './client';

export const fetchEmailStatus = () => get( '/email' );

export const sendTestEmail = ( to ) => post( '/email/test', { to } );

export const refreshSenders = () => post( '/email/senders/refresh', {} );
