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 Reset from "./Reset.js";
import FilterList from "./FilterList.js";
import HandleActions from "./HandleActions.js";
import QuickFilter from "./QuickFilter.js";
import dayjs from "dayjs";
import React, { useState } from "react";
import { Form } from "antd";
import { PisellDataSourceContainer, PisellToolBar } from "@pisell/materials";
//#region src/plus/orderList/components/Toolbar.tsx
const _excluded = ["serverActions", "refManager"];
const { useContainerContext } = PisellDataSourceContainer;
const Toolbar = (props) => {
	const { locales, clearSelectedData, __id } = props;
	const _useContainerContext = useContainerContext(), { serverActions, refManager } = _useContainerContext, otherProps = _objectWithoutProperties(_useContainerContext, _excluded);
	const [valueType, setValueType] = useState(void 0);
	return /* @__PURE__ */ React.createElement(Form, _objectSpread2({
		size: "large",
		layout: "vertical",
		initialValues: { orderDate: [dayjs().startOf("day"), dayjs().endOf("day")] }
	}, otherProps), /* @__PURE__ */ React.createElement(PisellToolBar, {
		topLeft: /* @__PURE__ */ React.createElement(QuickFilter, { locales }),
		topRight: /* @__PURE__ */ React.createElement(Reset, {
			locales,
			setValueType,
			clearSelectedData
		}),
		bottomLeft: /* @__PURE__ */ React.createElement(FilterList, {
			valueType,
			setValueType,
			locales
		}),
		bottomRight: /* @__PURE__ */ React.createElement(HandleActions, {
			locales,
			__id
		})
	}));
};
//#endregion
export { Toolbar as default };
