const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
const require_utils = require("../../../../utils.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
let _ant_design_icons = require("@ant-design/icons");
//#region src/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/DeviceConnectionSummary.tsx
const DeviceCard = ({ device, model, translation }) => {
	var _device$type, _model$type, _device$type2, _model$type2;
	return /* @__PURE__ */ react.default.createElement("div", { className: `device-detail-drawer__connect-summary-card is-${(device === null || device === void 0 ? void 0 : device.type_kind) || "dumb"}` }, /* @__PURE__ */ react.default.createElement("span", { className: `device-detail-drawer__connect-device-icon is-${(device === null || device === void 0 ? void 0 : device.type_kind) || "dumb"}` }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Icon, {
		type: (device === null || device === void 0 || (_device$type = device.type) === null || _device$type === void 0 ? void 0 : _device$type.icon) || (model === null || model === void 0 || (_model$type = model.type) === null || _model$type === void 0 ? void 0 : _model$type.icon) || "DesktopOutlined",
		color: require_utils.DEVICE_ICON_COLOR[(device === null || device === void 0 ? void 0 : device.type_kind) || "dumb"]
	})), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("strong", null, device ? translation(device.name) || device.id : translation(model === null || model === void 0 ? void 0 : model.name) || (model === null || model === void 0 ? void 0 : model.code)), /* @__PURE__ */ react.default.createElement("span", null, device ? translation((_device$type2 = device.type) === null || _device$type2 === void 0 ? void 0 : _device$type2.name) || device.type_code : translation(model === null || model === void 0 || (_model$type2 = model.type) === null || _model$type2 === void 0 ? void 0 : _model$type2.name) || (model === null || model === void 0 ? void 0 : model.type_code))));
};
const DeviceConnectionSummary = ({ mode, smartDevice, peripheral, selectedModel, translation }) => /* @__PURE__ */ react.default.createElement("div", {
	className: "device-detail-drawer__connect-summary",
	style: { marginBottom: "16px" }
}, /* @__PURE__ */ react.default.createElement(DeviceCard, {
	device: smartDevice,
	translation
}), /* @__PURE__ */ react.default.createElement(_ant_design_icons.LinkOutlined, null), mode === "new" ? /* @__PURE__ */ react.default.createElement(DeviceCard, {
	model: selectedModel,
	translation
}) : /* @__PURE__ */ react.default.createElement(DeviceCard, {
	device: peripheral,
	translation
}));
//#endregion
exports.default = DeviceConnectionSummary;
