import { cx as e } from "../../../theme/tools.js";
import { ChevronLeftSvg as t } from "../../../icons/ChevronLeftSvg.js";
import { ChevronRightSvg as n } from "../../../icons/ChevronRightSvg.js";
import { ShortcutHint as r } from "../../atoms/shortcut_hint/ShortcutHint.js";
import { button as i, buttonCollapsed as a, icon as o, label as s, labelCollapsed as c } from "./sidebarCollapseToggle.css.js";
import { jsx as l, jsxs as u } from "react/jsx-runtime";
import { useTranslation as d } from "react-i18next";
//#region src/backoffice/molecules/sidebar_collapse_toggle/SidebarCollapseToggle.tsx
var f = ({ isCollapsed: f, onToggle: p, label: m, expandLabel: h, shortcut: g, className: _ }) => {
	let { t: v } = d("ui", { useSuspense: !1 }), y = t, b = m ?? v("navigation.sidebar.actions.collapse", { defaultValue: "Collapse" }), x = h ?? v("navigation.sidebar.actions.expand", { defaultValue: "Expand" }), S = b;
	f && (y = n, S = x);
	let C = null;
	g != null && (C = /* @__PURE__ */ l(r, { keys: g }));
	let w;
	return typeof S == "string" && (w = S), /* @__PURE__ */ u("button", {
		type: "button",
		className: e(i, { [a]: f }, _),
		onClick: p,
		"aria-label": w,
		"aria-pressed": f,
		children: [
			/* @__PURE__ */ l("span", {
				className: o,
				"aria-hidden": "true",
				children: /* @__PURE__ */ l(y, {
					width: 18,
					height: 18
				})
			}),
			/* @__PURE__ */ l("span", {
				className: e(s, { [c]: f }),
				children: S
			}),
			C
		]
	});
};
//#endregion
export { f as SidebarCollapseToggle, f as default };

//# sourceMappingURL=SidebarCollapseToggle.js.map