const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
const require_types = require("../../../../types.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_materials = require("@pisell/materials");
//#region src/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/NewPeripheralInfoFields.tsx
const validateRequired = (message) => [{
	required: true,
	message
}];
const NewPeripheralInfoFields = ({ workAreas, workAreaId, currentWorkAreaId, getText, translation }) => /* @__PURE__ */ react.default.createElement("div", { className: "device-detail-drawer__connect-new-info" }, /* @__PURE__ */ react.default.createElement("div", { className: "device-detail-drawer__connect-section-title" }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Icon, { type: "InfoCircleOutlined" }), getText("pisell2.saas.device-planning.connect.new-info")), /* @__PURE__ */ react.default.createElement("div", { style: { height: "8px" } }), /* @__PURE__ */ react.default.createElement(antd.Form.Item, {
	name: "name",
	label: getText("pisell2.saas.device-planning.add.device-name"),
	required: true,
	rules: [{ validator: require_types.validateI18nRequired(getText("pisell2.saas.device-planning.add.device-name-required")) }]
}, /* @__PURE__ */ react.default.createElement(_pisell_materials.BaseTranslation, { renderMode: "edit" })), /* @__PURE__ */ react.default.createElement(antd.Form.Item, {
	name: "workarea_id",
	label: getText("pisell2.saas.device-planning.edit.work-area"),
	required: true,
	rules: validateRequired(getText("pisell2.saas.device-planning.edit.work-area-required"))
}, /* @__PURE__ */ react.default.createElement(_pisell_materials.Select, {
	value: workAreaId,
	options: workAreas.map((area) => ({
		label: `${translation(area.name) || area.id}${area.id === currentWorkAreaId ? ` (${getText("pisell2.saas.device-planning.connect.current")})` : ""}`,
		value: area.id
	}))
})));
//#endregion
exports.default = NewPeripheralInfoFields;
