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_withContainer = require("../../utils/withContainer.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
//#region src/components/pisellDataSourceContainer/components/Filter/FilterButton.tsx
const _excluded = [
	"serverActions",
	"value",
	"quickFilterMaxLength",
	"formFiltersPrefix",
	"hiddenQuickFilter",
	"hiddenOtherFilter"
];
const WithQuickFilter = (0, react.forwardRef)((props) => {
	const { serverActions, value: originalValue, quickFilterMaxLength, formFiltersPrefix, hiddenQuickFilter = true, hiddenOtherFilter = false } = 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: "vertical",
		className: "filter-form-wrapper"
	}, otherProps), /* @__PURE__ */ react.default.createElement(require_index.default, {
		value: {
			quickFilter: value.quickFilter,
			otherFilter: value.otherFilter
		},
		hiddenQuickFilter,
		hiddenOtherFilter,
		onChange: setValue,
		quickFilterMaxLength: quickFilterMaxLength || 100,
		formFiltersPrefix: formFiltersPrefix || ""
	}));
});
var FilterButton_default = require_withContainer.default(WithQuickFilter, "filterButton");
//#endregion
exports.default = FilterButton_default;
