<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function emailking_init_mod_logs() {
	require_once __DIR__ . '/api-handlers.php';
	require_once __DIR__ . '/class-logs.php';

	$app = $GLOBALS['EMAIL_KING'];

	\EmailKing\Mods\Logs::init();

	$app->api->add(
		'default',
		'get_logs',
		'emailking_api_get_logs'
	);

	$app->api->add(
		'default',
		'delete_logs',
		'emailking_api_delete_logs'
	);

	$app->api->add(
		'default',
		'resend_email',
		'emailking_api_resend_email'
	);
}
