import { cx as e } from "../../theme/tools.js";
import { ModalCloseSvg as t } from "../../icons/ModalCloseSvg.js";
import { actions as n, closeButton as r, container as i, content as a, description as o, title as s, toneRecipe as c } from "./inlineBanner.css.js";
import { jsx as l, jsxs as u } from "react/jsx-runtime";
import { useTranslation as d } from "react-i18next";
//#region src/components/feedback/InlineBanner.tsx
var f = ({ tone: f = "info", title: p, children: m, actions: h, onDismiss: g, dismissLabel: _, className: v, role: y, ariaLive: b }) => {
	let { t: x } = d("ui", { useSuspense: !1 }), S = typeof g == "function", C = _ ?? x("backoffice.inlineBanner.dismiss"), w = y;
	w ?? (w = "status", f === "danger" && (w = "alert"));
	let T = b;
	T ?? (T = "polite", f === "danger" && (T = "assertive"));
	let E = null;
	p != null && (E = /* @__PURE__ */ l("div", {
		className: s,
		children: p
	}));
	let D = null;
	m != null && (D = /* @__PURE__ */ l("div", {
		className: o,
		children: m
	}));
	let O = null;
	return S && (O = /* @__PURE__ */ l("button", {
		type: "button",
		onClick: g,
		className: r,
		"aria-label": C,
		children: /* @__PURE__ */ l(t, {
			width: 18,
			height: 18,
			"aria-hidden": "true"
		})
	})), /* @__PURE__ */ u("div", {
		className: e(i, c({ tone: f }), v),
		role: w,
		"aria-live": T,
		children: [/* @__PURE__ */ u("div", {
			className: a,
			children: [E, D]
		}), /* @__PURE__ */ u("div", {
			className: n,
			children: [h, O]
		})]
	});
};
//#endregion
export { f as InlineBanner, f as default };

//# sourceMappingURL=InlineBanner.js.map