const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_useTerminalPeripherals = require("../../hooks/useTerminalPeripherals.js");
const require_useNativeScanner = require("../../hooks/useNativeScanner.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
require("./index.less");
//#region src/pro/comprehensiveSearch/components/deviceIconGroup/index.tsx
const DeviceIconGroup = ({ isShowScanner = true, isShowCamera = true, isShowNFC = true, style, className }) => {
	const { peripheralsStatus } = require_useTerminalPeripherals.default();
	const { isTerminal } = require_useNativeScanner.default();
	const statusIndicator = (status) => {
		return /* @__PURE__ */ react.default.createElement(_pisell_materials.Iconfont, {
			style: {
				borderRadius: "50%",
				background: status ? "#17B26A" : "#F04438",
				color: "#fff"
			},
			type: status ? "pisell2-check" : "pisell2-x-close"
		});
	};
	return /* @__PURE__ */ react.default.createElement("div", {
		className: `device-icon-group ${className || ""}`,
		style
	}, isShowScanner && /* @__PURE__ */ react.default.createElement("span", { className: "device-icon-group__icon-item" }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Iconfont, { type: "pisell2-Scanner" }), /* @__PURE__ */ react.default.createElement("div", { className: "status-indicator" }, statusIndicator((peripheralsStatus === null || peripheralsStatus === void 0 ? void 0 : peripheralsStatus.scanner) === "connected"))), isShowNFC && /* @__PURE__ */ react.default.createElement("span", { className: "device-icon-group__icon-item" }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Iconfont, { type: "pisell2-NFC" }), /* @__PURE__ */ react.default.createElement("div", { className: "status-indicator" }, statusIndicator((peripheralsStatus === null || peripheralsStatus === void 0 ? void 0 : peripheralsStatus.nfc) === "connected"))), isShowCamera && /* @__PURE__ */ react.default.createElement("span", { className: "device-icon-group__icon-item" }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Iconfont, { type: "pisell2-camera" }), /* @__PURE__ */ react.default.createElement("div", { className: "status-indicator" }, statusIndicator(isTerminal))));
};
//#endregion
exports.default = DeviceIconGroup;
