import React, { useMemo } from 'react';
import "./Presets.less";
var Presets = function Presets(props) {
  var presets = props.presets,
    onChange = props.onChange;
  return useMemo(function () {
    if (!(presets !== null && presets !== void 0 && presets.length)) {
      return null;
    }
    return /*#__PURE__*/React.createElement("div", {
      className: "pisell-virtual-keyboard-preset"
    }, presets.map(function (item) {
      return /*#__PURE__*/React.createElement("div", {
        onClick: function onClick() {
          return onChange("".concat(item.value));
        },
        className: "pisell-virtual-keyboard-preset-item"
      }, item.label);
    }));
  }, [presets]);
};
export default Presets;