import React from 'react';
import { isMobile, locales } from '@pisell/utils';
import useEngineContext from "../../hooks/useEngineContext";
import { ScanOrderProvider } from "./context";
import Content from "./components/Content";
import { normalizeEntryContext } from "./hooks";
import localeTexts from "./locales";
import "./index.less";
function ScanOrder(props) {
  var _context$engine, _context$engine2;
  var context = useEngineContext();
  var entryContext = normalizeEntryContext(context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 ? void 0 : _context$engine.props);
  locales.init(localeTexts, (context === null || context === void 0 || (_context$engine2 = context.engine) === null || _context$engine2 === void 0 || (_context$engine2 = _context$engine2.props) === null || _context$engine2 === void 0 ? void 0 : _context$engine2.locale) || 'en');
  return /*#__PURE__*/React.createElement("div", {
    className: "pisell-scan-order-wrap ".concat(isMobile() ? 'pisell-scan-order-mobile-wrap' : '')
  }, /*#__PURE__*/React.createElement(ScanOrderProvider, {
    entryContext: entryContext
  }, /*#__PURE__*/React.createElement(Content, null)));
}
export default ScanOrder;