const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_index = require("../../../filter/components/FilterButton/index.js");
const require_index$1 = require("../../../filter/components/QuickFilter/index.js");
const require_withContainer = require("../../utils/withContainer.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
//#region src/components/pisellDataSourceContainer/components/Filter/index.tsx
const _excluded = [
	"serverActions",
	"refManager",
	"value",
	"formFiltersPrefix",
	"quickFilterMaxLength"
];
const WithFilter = (0, react.forwardRef)((props) => {
	const { serverActions, refManager, value: originalValue, formFiltersPrefix, quickFilterMaxLength } = props, otherProps = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const [value, setValue] = (0, react.useState)({});
	(0, react.useEffect)(() => {
		setValue({
			quickFilter: (originalValue === null || originalValue === void 0 ? void 0 : originalValue.quickFilter) || [],
			otherFilter: (originalValue === null || originalValue === void 0 ? void 0 : originalValue.otherFilter) || []
		});
	}, [originalValue]);
	return /* @__PURE__ */ react.default.createElement(antd.Form, require_objectSpread2._objectSpread2({
		size: "large",
		layout: "inline",
		className: "filter-form-wrapper"
	}, otherProps), /* @__PURE__ */ react.default.createElement(require_index$1.default, {
		value: { quickFilter: (value === null || value === void 0 ? void 0 : value.quickFilter) || [] },
		formFiltersPrefix: formFiltersPrefix || ""
	}), /* @__PURE__ */ react.default.createElement(require_index.default, {
		value,
		onChange: setValue,
		quickFilterMaxLength: quickFilterMaxLength || 10,
		formFiltersPrefix: formFiltersPrefix || ""
	}));
});
var Filter_default = require_withContainer.default(WithFilter, "filter");
//#endregion
exports.default = Filter_default;
