import { getText } from "../../../locales/index.js";
import PisellScan from "../../pisellScan/index.js";
import React, { useRef } from "react";
import "./index.less";
//#region src/components/pisellInformationEntry/Scan/index.tsx
const Scan = (props) => {
	const { onChange, onCancel } = props;
	const scanRef = useRef(null);
	return /* @__PURE__ */ React.createElement(PisellScan, {
		width: "100%",
		height: "200px",
		borderRadius: "12px",
		onChange,
		timeBetweenScansMillis: 1e3,
		ref: scanRef
	}, /* @__PURE__ */ React.createElement("div", { className: "pisell-scan-custom-action" }, /* @__PURE__ */ React.createElement("span", { onClick: () => {
		var _scanRef$current;
		(_scanRef$current = scanRef.current) === null || _scanRef$current === void 0 || (_scanRef$current = _scanRef$current.codeReader) === null || _scanRef$current === void 0 || _scanRef$current.reset();
		onCancel();
	} }, getText("pisell-information-entry-scan-exit"))));
};
//#endregion
export { Scan as default };
