"use strict";exports.__esModule = true;exports.getKeyName = exports.checkKeyPressed = void 0;

var _client = require("../../lib/client");


var _ThemeHelpers = require("../../lib/theming/ThemeHelpers");






var keyDescription = null;

var getKeyDescription = function getKeyDescription(theme) {return keyDescription || (keyDescription = createKeyDescription(theme));};

var createKeyDescription = function createKeyDescription(theme) {return (
    _client.isMac ?
    {
      name: (0, _ThemeHelpers.isThemeGTE)(theme, '5.3') ? '⌥' : 'Alt',
      checkPressed: function checkPressed(event) {return event.altKey;}
    } :
    {
      name: 'Ctrl',
      checkPressed: function checkPressed(event) {return event.ctrlKey;}
    });};

var getKeyName = exports.getKeyName = function getKeyName(t) {return getKeyDescription(t).name;};
var checkKeyPressed = exports.checkKeyPressed = function checkKeyPressed(event, theme) {return (
    getKeyDescription(theme).checkPressed(event));};