import { AmbientTextField } from "../../../inputs/textField/AmbientTextField.mjs";
import { AmbientTokenButton } from "../../../inputs/buttons/AmbientTokenButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { InputAdornment, Tab, Tabs, Typography, lighten, makeStyles } from "@material-ui/core";
import { BlockedIcon, ClearIcon, CombineIcon, DeleteIcon, DownloadIcon, ExportIcon, SaveIcon, SearchIcon } from "@fluentui/react-icons";
import PropTypes from "prop-types";
//#region src/UI/utilityDisplay/deprecated/grid/GridActionBar.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		flexDirection: "row",
		padding: theme.spacing(.5),
		background: (props) => props.background ? props.background : lighten(theme.palette.secondary.light, .9)
	},
	label: {
		display: "flex",
		alignItems: "center",
		justifyContent: "flex-end"
	},
	title: {
		flex: 1,
		display: "flex",
		alignItems: "center",
		marginLeft: (props) => props.title ? theme.spacing(2) : 0
	},
	tabRoot: {
		minWidth: 0,
		textTransform: "none"
	},
	controls: {
		display: "flex",
		alignItems: "center",
		gridGap: theme.spacing(2),
		gap: theme.spacing(2),
		marginRight: theme.spacing(2)
	},
	icon: {
		background: theme.palette.common.white,
		padding: theme.spacing(1),
		color: theme.palette.secondary.main
	}
}));
/** @deprecated Use the new grid. */
const GridActionBar = (props) => {
	const $ = c(67);
	const classes = useStyles(props);
	const { children, onChange, handleChange, value, fitClick, expandClick, clearClick, exportClick, saveGridConfig, deleteGridConfig, clearGridConfig, title, hideFitGrid: t0, hideExpandGrid: t1, hideExportGrid: t2, hideRemoveFilters: t3, hideFilterTab: t4, hideGroupTab: t5, hideColumnTab: t6, hideSearchBar: t7 } = props;
	const hideFitGrid = t0 === void 0 ? false : t0;
	const hideExpandGrid = t1 === void 0 ? false : t1;
	const hideExportGrid = t2 === void 0 ? false : t2;
	const hideRemoveFilters = t3 === void 0 ? false : t3;
	const hideFilterTab = t4 === void 0 ? false : t4;
	const hideGroupTab = t5 === void 0 ? false : t5;
	const hideColumnTab = t6 === void 0 ? false : t6;
	const hideSearchBar = t7 === void 0 ? false : t7;
	let t8;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = /* @__PURE__ */ React.createElement("div", null);
		$[0] = t8;
	} else t8 = $[0];
	const gridControlsExport = t8;
	let t9;
	if ($[1] !== title) {
		t9 = title && /* @__PURE__ */ React.createElement(Typography, {
			variant: "h6",
			style: {
				overflow: "hidden",
				whiteSpace: "nowrap",
				textOverflow: "ellipsis"
			}
		}, " ", title, " ");
		$[1] = title;
		$[2] = t9;
	} else t9 = $[2];
	let t10;
	if ($[3] !== hideSearchBar || $[4] !== onChange || $[5] !== title) {
		t10 = !hideSearchBar && /* @__PURE__ */ React.createElement("div", { style: {
			flex: 1,
			marginLeft: 16,
			marginRight: 16,
			marginTop: -16
		} }, /* @__PURE__ */ React.createElement(AmbientTextField, {
			title,
			onChange,
			InputProps: {
				type: "search",
				startAdornment: /* @__PURE__ */ React.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React.createElement(SearchIcon, null))
			}
		}));
		$[3] = hideSearchBar;
		$[4] = onChange;
		$[5] = title;
		$[6] = t10;
	} else t10 = $[6];
	let t11;
	if ($[7] !== classes.title || $[8] !== t10 || $[9] !== t9) {
		t11 = /* @__PURE__ */ React.createElement("div", { className: classes.title }, t9, t10);
		$[7] = classes.title;
		$[8] = t10;
		$[9] = t9;
		$[10] = t11;
	} else t11 = $[10];
	let t12;
	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
		t12 = /* @__PURE__ */ React.createElement("div", null, " ", gridControlsExport);
		$[11] = t12;
	} else t12 = $[11];
	let t13;
	if ($[12] !== classes.icon || $[13] !== saveGridConfig) {
		t13 = saveGridConfig && /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			iconClassName: classes.icon,
			icon: SaveIcon,
			tooltip: "Save Grid Configuration",
			ariaLabel: "Save Grid Configuration",
			onClick: saveGridConfig
		});
		$[12] = classes.icon;
		$[13] = saveGridConfig;
		$[14] = t13;
	} else t13 = $[14];
	let t14;
	if ($[15] !== classes.icon || $[16] !== deleteGridConfig) {
		t14 = deleteGridConfig && /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			iconClassName: classes.icon,
			icon: DeleteIcon,
			tooltip: "Delete Grid Configuration",
			ariaLabel: "Delete Grid Configuration",
			onClick: deleteGridConfig
		});
		$[15] = classes.icon;
		$[16] = deleteGridConfig;
		$[17] = t14;
	} else t14 = $[17];
	let t15;
	if ($[18] !== classes.icon || $[19] !== clearGridConfig) {
		t15 = clearGridConfig && /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			iconClassName: classes.icon,
			icon: ClearIcon,
			tooltip: "Clear Grid Configuration",
			ariaLabel: "Clear Grid Configuration",
			onClick: clearGridConfig
		});
		$[18] = classes.icon;
		$[19] = clearGridConfig;
		$[20] = t15;
	} else t15 = $[20];
	let t16;
	if ($[21] !== classes.icon || $[22] !== fitClick || $[23] !== hideFitGrid) {
		t16 = !hideFitGrid && /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			iconClassName: classes.icon,
			icon: CombineIcon,
			tooltip: "Fit Grid",
			ariaLabel: "Fit Grid",
			onClick: fitClick
		});
		$[21] = classes.icon;
		$[22] = fitClick;
		$[23] = hideFitGrid;
		$[24] = t16;
	} else t16 = $[24];
	let t17;
	if ($[25] !== classes.icon || $[26] !== expandClick || $[27] !== hideExpandGrid) {
		t17 = !hideExpandGrid && /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			iconClassName: classes.icon,
			icon: ExportIcon,
			tooltip: "Expand Grid",
			ariaLabel: "Expand Grid",
			onClick: expandClick
		});
		$[25] = classes.icon;
		$[26] = expandClick;
		$[27] = hideExpandGrid;
		$[28] = t17;
	} else t17 = $[28];
	let t18;
	if ($[29] !== classes.icon || $[30] !== exportClick || $[31] !== hideExportGrid) {
		t18 = !hideExportGrid && /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			iconClassName: classes.icon,
			icon: DownloadIcon,
			tooltip: "Export Grid",
			ariaLabel: "Export Grid",
			onClick: exportClick
		});
		$[29] = classes.icon;
		$[30] = exportClick;
		$[31] = hideExportGrid;
		$[32] = t18;
	} else t18 = $[32];
	let t19;
	if ($[33] !== classes.icon || $[34] !== clearClick || $[35] !== hideRemoveFilters) {
		t19 = !hideRemoveFilters && /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			iconClassName: classes.icon,
			icon: BlockedIcon,
			tooltip: "Remove Filters",
			ariaLabel: "Remove Filters",
			onClick: clearClick
		});
		$[33] = classes.icon;
		$[34] = clearClick;
		$[35] = hideRemoveFilters;
		$[36] = t19;
	} else t19 = $[36];
	let t20;
	if ($[37] !== classes.controls || $[38] !== t13 || $[39] !== t14 || $[40] !== t15 || $[41] !== t16 || $[42] !== t17 || $[43] !== t18 || $[44] !== t19) {
		t20 = /* @__PURE__ */ React.createElement("div", { className: classes.controls }, t13, t14, t15, t16, t17, t18, t19);
		$[37] = classes.controls;
		$[38] = t13;
		$[39] = t14;
		$[40] = t15;
		$[41] = t16;
		$[42] = t17;
		$[43] = t18;
		$[44] = t19;
		$[45] = t20;
	} else t20 = $[45];
	let t21;
	if ($[46] !== classes.tabRoot || $[47] !== hideFilterTab) {
		t21 = !hideFilterTab && /* @__PURE__ */ React.createElement(Tab, {
			label: "Filter",
			classes: { root: classes.tabRoot }
		});
		$[46] = classes.tabRoot;
		$[47] = hideFilterTab;
		$[48] = t21;
	} else t21 = $[48];
	let t22;
	if ($[49] !== classes.tabRoot || $[50] !== hideGroupTab) {
		t22 = !hideGroupTab && /* @__PURE__ */ React.createElement(Tab, {
			label: "Group",
			classes: { root: classes.tabRoot }
		});
		$[49] = classes.tabRoot;
		$[50] = hideGroupTab;
		$[51] = t22;
	} else t22 = $[51];
	let t23;
	if ($[52] !== classes.tabRoot || $[53] !== hideColumnTab) {
		t23 = !hideColumnTab && /* @__PURE__ */ React.createElement(Tab, {
			label: "Column",
			classes: { root: classes.tabRoot }
		});
		$[52] = classes.tabRoot;
		$[53] = hideColumnTab;
		$[54] = t23;
	} else t23 = $[54];
	let t24;
	if ($[55] !== handleChange || $[56] !== t21 || $[57] !== t22 || $[58] !== t23 || $[59] !== value) {
		t24 = /* @__PURE__ */ React.createElement(Tabs, {
			value,
			onChange: handleChange,
			"aria-label": "basic tabs example"
		}, t21, t22, t23);
		$[55] = handleChange;
		$[56] = t21;
		$[57] = t22;
		$[58] = t23;
		$[59] = value;
		$[60] = t24;
	} else t24 = $[60];
	let t25;
	if ($[61] !== children || $[62] !== classes.root || $[63] !== t11 || $[64] !== t20 || $[65] !== t24) {
		t25 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t11, t12, t20, t24, children);
		$[61] = children;
		$[62] = classes.root;
		$[63] = t11;
		$[64] = t20;
		$[65] = t24;
		$[66] = t25;
	} else t25 = $[66];
	return t25;
};
GridActionBar.propTypes = {
	title: PropTypes.string,
	children: PropTypes.node,
	handleChange: PropTypes.func,
	value: PropTypes.number,
	fitClick: PropTypes.func,
	expandClick: PropTypes.func,
	clearClick: PropTypes.func,
	exportClick: PropTypes.func
};
//#endregion
export { GridActionBar };

//# sourceMappingURL=GridActionBar.mjs.map