import { getClientOs } from './platform';

export const modifierKey = (os?: string): 'Cmd' | 'Ctrl' => {
  const platform = os ?? getClientOs();
  return platform === 'MacOS' ? 'Cmd' : 'Ctrl';
};

export const formatShortcut = (key: string, os?: string): string => {
  const modifier = modifierKey(os);
  return `${modifier} + ${key}`;
};
