const require_runtime = require("../../../../../_virtual/_rolldown/runtime.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/appPeripheral/components/connectDeviceModal/ConnectDeviceModalHeader.tsx
const ConnectDeviceModalHeader = ({ mode, step, currentDevice, currentIsSmart, getText, translation, onBack }) => {
	const deviceName = translation(currentDevice.name) || String(currentDevice.id);
	const title = mode === "edit" ? getText("pisell2.saas.device-planning.connect.edit-title").replace("{DeviceName}", deviceName) : mode === "new" ? getText("pisell2.saas.device-planning.connect.add-new-title").replace("{DeviceName}", deviceName) : currentIsSmart ? getText("pisell2.saas.device-planning.connect.existing-peripheral-title").replace("{DeviceName}", deviceName) : getText("pisell2.saas.device-planning.connect.existing-smart-title").replace("{DeviceName}", deviceName);
	return /* @__PURE__ */ react.default.createElement("div", { className: "saas-app-peripheral-connect__modal-title" }, step === "config" && mode !== "edit" ? /* @__PURE__ */ react.default.createElement(_pisell_materials.Button, {
		type: "text",
		icon: /* @__PURE__ */ react.default.createElement(_ant_design_icons.ArrowLeftOutlined, null),
		onClick: onBack
	}) : null, /* @__PURE__ */ react.default.createElement("span", null, title));
};
//#endregion
exports.default = ConnectDeviceModalHeader;
