import React__default from 'react';
import { Button } from '@mui/material';
import { QRCodeCardWrapper, QRCodeCardTextWrapper } from './style.js';
import QRCodeGenerator from 'react-qr-code';
import CopyIcon from '../../Icons/CopyIcon/index.js';
import { ThemeProvider } from 'styled-components';
import theme from '../../../Globals/theme.js';
import globalStyle from '../../../Globals/global-styles.js';

var QRCode = function QRCode(_ref) {
  var code = _ref.code,
      size = _ref.size;
  return /*#__PURE__*/React__default.createElement(ThemeProvider, {
    theme: theme
  }, /*#__PURE__*/React__default.createElement(globalStyle, null), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(QRCodeCardWrapper, null, /*#__PURE__*/React__default.createElement(QRCodeGenerator, {
    size: size,
    value: code
  }), /*#__PURE__*/React__default.createElement(QRCodeCardTextWrapper, null, code), /*#__PURE__*/React__default.createElement(Button, {
    onClick: function onClick() {
      return navigator.clipboard.writeText(code);
    }
  }, /*#__PURE__*/React__default.createElement(CopyIcon, null), "Copy"))));
};

export { QRCode as default };
//# sourceMappingURL=index.js.map
