/* global process */

if (process.platform !== 'darwin') {
    module.exports = { webauthn: null, print: null };
} else {
    const arch = process.arch === 'arm64' ? 'arm64' : 'x64';
    const binding = require(`./native-modules.darwin-${arch}.node`);
    module.exports = {
        webauthn: {
            getCredentials: binding.getCredentials,
            createCredentials: binding.createCredentials,
            cancel: binding.cancel,
        },
        print: {
            printDocument: binding.printDocument,
        },
    };
}
