import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import Filter from "../../../filter/components/FilterButton/index.js";
import QuickFilter from "../../../filter/components/QuickFilter/index.js";
import withContainer from "../../utils/withContainer.js";
import React, { forwardRef, useEffect, useState } from "react";
import { Form } from "antd";
//#region src/components/pisellDataSourceContainer/components/Filter/index.tsx
const _excluded = [
	"serverActions",
	"refManager",
	"value",
	"formFiltersPrefix",
	"quickFilterMaxLength"
];
var Filter_default = withContainer(forwardRef((props) => {
	const { serverActions, refManager, value: originalValue, formFiltersPrefix, quickFilterMaxLength } = props, otherProps = _objectWithoutProperties(props, _excluded);
	const [value, setValue] = useState({});
	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.createElement(Form, _objectSpread2({
		size: "large",
		layout: "inline",
		className: "filter-form-wrapper"
	}, otherProps), /* @__PURE__ */ React.createElement(QuickFilter, {
		value: { quickFilter: (value === null || value === void 0 ? void 0 : value.quickFilter) || [] },
		formFiltersPrefix: formFiltersPrefix || ""
	}), /* @__PURE__ */ React.createElement(Filter, {
		value,
		onChange: setValue,
		quickFilterMaxLength: quickFilterMaxLength || 10,
		formFiltersPrefix: formFiltersPrefix || ""
	}));
}), "filter");
//#endregion
export { Filter_default as default };
