const { requirePermissions } = require("./auth");

const inventoryRead = ["inventory:read", "admin:*"];
const inventoryWrite = ["inventory:write", "admin:*"];
const posRead = ["pos:read", "admin:*"];
const posWrite = ["pos:write", "admin:*"];
const adminOnly = ["admin:*"];

module.exports = {
  requireInventoryRead: requirePermissions(inventoryRead),
  requireInventoryWrite: requirePermissions(inventoryWrite),
  requirePosRead: requirePermissions(posRead),
  requirePosWrite: requirePermissions(posWrite),
  requireAdminPerm: requirePermissions(adminOnly),
};
