let addon;
try {
  // 尝试加载预编译的二进制文件
  addon = require('node-gyp-build')(__dirname);
} catch (error) {
  console.warn('Warning: Native addon not found, using fallback implementation');
  // 提供一个fallback实现
  addon = {
    preventSleep: () => {},
    allowSleep: () => {}
  };
}

module.exports = {
  preventSleep: addon.preventSleep,
  allowSleep: addon.allowSleep
};
