import { define } from './chunk-WIL4LMMA.js';
import { getBackendInfo, lockSession } from './chunk-JE2IMKMO.js';
import { __name } from './chunk-IBAHCH6O.js';

// src/cli/commands/lock.command.ts
var commandSpec = define({
  name: "lock",
  description: "Lock the encryption daemon, requiring biometric for next decrypt"
});
var commandFn = /* @__PURE__ */ __name(async () => {
  const backend = getBackendInfo();
  if (!backend.biometricAvailable) {
    console.log(`The ${backend.type} backend does not support biometric lock.`);
    return;
  }
  try {
    await lockSession();
    console.log("Encryption session locked. Biometric authentication will be required for next decrypt.");
  } catch {
    console.log("No encryption daemon is running \u2014 nothing to lock.");
  }
}, "commandFn");

export { commandFn, commandSpec };
//# sourceMappingURL=chunk-5QPV7UIW.js.map
//# sourceMappingURL=chunk-5QPV7UIW.js.map