Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../chunk-BN4qSVkS.cjs");
const require_components_QRReader_hooks = require("./hooks.cjs");
const require_components_QRReader_styles = require("./styles.cjs");
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
//#region src/components/QRReader/QRReader.tsx
function QRReader({ videoContainerStyle = {}, containerStyle = {}, videoStyle = {}, constraints, scanDelay, className, onResult, videoId }) {
	require_components_QRReader_hooks.useQRReader({
		constraints,
		scanDelay,
		onResult,
		videoId
	});
	return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("section", {
		className,
		style: containerStyle,
		children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
			style: {
				...require_components_QRReader_styles.styles.container,
				...videoContainerStyle
			},
			children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("video", {
				muted: true,
				id: videoId,
				style: {
					...require_components_QRReader_styles.styles.video,
					...videoStyle,
					transform: constraints?.facingMode === "user" ? "scaleX(-1)" : void 0
				}
			})
		})
	});
}
QRReader.displayName = "QRReader";
QRReader.defaultProps = {
	constraints: { facingMode: "user" },
	videoId: "video",
	scanDelay: 500
};
//#endregion
exports.QRReader = QRReader;
