function isDebugPreviewEnabled(debug) {
  return debug === true || debug === "true";
}

function logPrintPreview(logPreview, action, printableOutput, order, mode, printer) {
  logPreview(action, printableOutput, {
    mode,
    orderId: order?.id,
    table: order?.table?.name,
    printer,
  });
}

module.exports = {
  isDebugPreviewEnabled,
  logPrintPreview,
};