/**
 * mailx-host — runtime WebView host selector.
 *
 * Today: msger on every platform.
 * Future: lazy-load @bobfrankston/mailx-host-msgview for Mac and niche
 * Linux systems that can't get webkit2gtk-4.1.
 *
 * Callers (bin/mailx.ts) import showMessageBox / showService / setAppName
 * from here instead of @bobfrankston/msger directly, so the swap is a
 * one-line change when msgview arrives.
 */
import * as msger from "@bobfrankston/msger";
export function selectHost() {
    const requested = (process.env.MAILX_HOST || "").toLowerCase();
    if (requested === "msger" || requested === "msgview")
        return requested;
    return "msger";
}
const _hostName = selectHost();
if (_hostName !== "msger") {
    throw new Error(`mailx-host: "${_hostName}" adapter not implemented yet — set MAILX_HOST=msger to fall back, ` +
        `or implement @bobfrankston/mailx-host-msgview (see docs/host-abstraction-plan.md).`);
}
export const showMessageBox = msger.showMessageBox;
/** Same as showMessageBox but returns a MessageBoxHandle whose `pid` and
 *  `close()` let callers reap the spawned child without name-based
 *  sweeps. Used by the reminder-popup spawn path so a daemon shutdown
 *  can cross-platform SIGTERM open popups via instance.json child PIDs. */
export const showMessageBoxEx = msger.showMessageBoxEx;
export const showService = msger.showService;
export const setAppName = msger.setAppName;
export const setAppIcon = msger.setAppIcon;
export const hostName = _hostName;
//# sourceMappingURL=index.js.map