import SchedulesModule from "./SchedulesModule/index.js";
import MaxParticipantsModule from "./MaxParticipantsModule/index.js";
import ResourcesModule from "./ResourcesModule/index.js";
import React from "react";
import { Form } from "antd";
import "./index.less";
//#region src/components/schedules/products/ProductDetailDrawer/ProductDetail/index.tsx
const ProductDetail = ({ form, currentProduct }) => {
	const useSchedule = Form.useWatch("schedule", form);
	const isAutoChange = Form.useWatch("isAutoChange", form);
	return /* @__PURE__ */ React.createElement("div", { className: "product-detail-card" }, /* @__PURE__ */ React.createElement(Form.Item, {
		noStyle: true,
		name: "schedule"
	}, /* @__PURE__ */ React.createElement(SchedulesModule, {
		tabKey: "products",
		onChange: () => {
			form.setFieldsValue({ isAutoChange: true });
		}
	})), /* @__PURE__ */ React.createElement(Form.Item, {
		noStyle: true,
		name: "max_participants"
	}, /* @__PURE__ */ React.createElement(MaxParticipantsModule, {
		form,
		useSchedule,
		isAutoChange
	})), /* @__PURE__ */ React.createElement(Form.Item, {
		hidden: true,
		name: "isAutoChange",
		initialValue: false
	}, /* @__PURE__ */ React.createElement("switch", null)), /* @__PURE__ */ React.createElement(ResourcesModule, { product: currentProduct }));
};
//#endregion
export { ProductDetail as default };
