import { jsxs as s, jsx as t } from "react/jsx-runtime";
import { forwardRef as _ } from "react";
import { cx as N } from "../../utils/classNames.js";
import { useArrowTheme as x } from "../../hooks/useArrowTheme.js";
import { IconButton as w } from "../icon-button/IconButton.js";
const y = _(
  ({
    id: e,
    body: r,
    title: i,
    action: o,
    leadingIcon: d,
    leadingIconA11yLabel: g,
    variant: l = "default",
    isDismissable: a = !1,
    dismissButtonFocused: n = !1,
    onDismiss: c,
    elevated: m = !0,
    alternate: f,
    inverse: h,
    className: u
  }, b) => {
    const p = x(), v = h ?? p.inverse;
    return /* @__PURE__ */ s(
      "div",
      {
        ref: b,
        id: e,
        className: N(
          "tdds-tidbit",
          {
            ["tdds-tidbit--" + l]: l !== "default",
            "tdds-tidbit--not-elevated": !m
          },
          u
        ),
        "data-inverse": String(v),
        "data-alternate": f || void 0,
        children: [
          d ? /* @__PURE__ */ t("div", { className: "tdds-tidbit__infoIcon", children: d }) : null,
          /* @__PURE__ */ s("div", { className: "tdds:pl-1", children: [
            i ? /* @__PURE__ */ t("h2", { id: `${e}__title`, className: "tdds-tidbit__title", children: i }) : null,
            /* @__PURE__ */ t("p", { className: "tdds-tidbit__body", children: r }),
            o ?? null
          ] }),
          a ? /* @__PURE__ */ t(
            w,
            {
              a11yLabel: "Close",
              icon: /* @__PURE__ */ t("svg", { viewBox: "0 0 24 24", width: "24", height: "24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }),
              size: "small",
              focused: n,
              onClick: c
            }
          ) : null
        ]
      }
    );
  }
);
y.displayName = "Tidbit";
export {
  y as Tidbit
};
//# sourceMappingURL=Tidbit.js.map
