import { getText } from "../../../locales/index.js";
import React from "react";
import { Button, Input, Space } from "antd";
import "./index.less";
import SearchLg from "@pisell/icon/es/SearchLg";
//#region src/components/table/TableFilter/stringFilter.tsx
const getColumnStringProps = ({ dataIndex }) => ({
	filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, close }) => /* @__PURE__ */ React.createElement("div", {
		onKeyDown: (e) => e.stopPropagation(),
		className: "pisell-table-filter-dropdown"
	}, /* @__PURE__ */ React.createElement("div", { className: "pisell-table-filter-dropdown-top" }, /* @__PURE__ */ React.createElement(Input, {
		prefix: /* @__PURE__ */ React.createElement(SearchLg, null),
		placeholder: getText("table-filter-search"),
		value: selectedKeys[0],
		onChange: (e) => setSelectedKeys(e.target.value ? [e.target.value] : []),
		onPressEnter: () => confirm(),
		style: { width: 240 }
	})), /* @__PURE__ */ React.createElement(Space, {
		className: "pisell-table-filter-dropdown-bottom",
		styles: { item: { flex: 1 } }
	}, /* @__PURE__ */ React.createElement(Button, {
		onClick: () => {
			clearFilters && clearFilters();
			confirm();
		},
		block: true,
		style: { flex: 1 }
	}, getText("table-filter-clear")), /* @__PURE__ */ React.createElement(Button, {
		type: "primary",
		onClick: () => confirm(),
		block: true,
		style: { flex: 1 }
	}, getText("table-filter-filter")))),
	filterIcon: (filtered) => /* @__PURE__ */ React.createElement(SearchLg, { style: {
		color: filtered ? "#7f56d9" : void 0,
		fontSize: 16
	} })
});
//#endregion
export { getColumnStringProps as default };
