export async function registerSendGridMailDriver(registry) {
    const core = (await importCore());
    const driver = core.SendGridDriver;
    if (driver === undefined)
        return;
    registry.register('sendgrid', (config, message) => driver.send(config, message));
}
const importCore = async () => {
    try {
        return await import('../../../src/index.js');
    }
    catch {
        try {
            return await import('../../../src/index.js');
        }
        catch {
            return {};
        }
    }
};
const core = (await importCore());
if (core.MailDriverRegistry !== undefined) {
    await registerSendGridMailDriver(core.MailDriverRegistry);
}
