import React from "react";
import { Button } from "@pisell/materials";
import { ArrowLeftOutlined } from "@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.createElement("div", { className: "saas-app-peripheral-connect__modal-title" }, step === "config" && mode !== "edit" ? /* @__PURE__ */ React.createElement(Button, {
		type: "text",
		icon: /* @__PURE__ */ React.createElement(ArrowLeftOutlined, null),
		onClick: onBack
	}) : null, /* @__PURE__ */ React.createElement("span", null, title));
};
//#endregion
export { ConnectDeviceModalHeader as default };
