import g from "./index-objectWithoutPropertiesLoose.js";
import p from "./index-extends.js";
import * as b from "react";
import e from "./index-_virtual16.js";
import { clsx as C } from "./index-clsx.js";
import { c as x } from "./index-colorManipulator2.js";
import c from "./index-styled.js";
import { getSnackbarContentUtilityClass as k } from "./index-snackbarContentClasses.js";
import { jsxs as v, jsx as l } from "react/jsx-runtime";
import { useDefaultProps as S } from "./index-DefaultPropsProvider.js";
import y from "./index-composeClasses.js";
import R from "./index-Paper.js";
const w = ["action", "className", "message", "role"], N = (o) => {
  const {
    classes: t
  } = o;
  return y({
    root: ["root"],
    action: ["action"],
    message: ["message"]
  }, k, t);
}, M = c(R, {
  name: "MuiSnackbarContent",
  slot: "Root",
  overridesResolver: (o, t) => t.root
})(({
  theme: o
}) => {
  const t = o.palette.mode === "light" ? 0.8 : 0.98, r = x.emphasize(o.palette.background.default, t);
  return p({}, o.typography.body2, {
    color: o.vars ? o.vars.palette.SnackbarContent.color : o.palette.getContrastText(r),
    backgroundColor: o.vars ? o.vars.palette.SnackbarContent.bg : r,
    display: "flex",
    alignItems: "center",
    flexWrap: "wrap",
    padding: "6px 16px",
    borderRadius: (o.vars || o).shape.borderRadius,
    flexGrow: 1,
    [o.breakpoints.up("sm")]: {
      flexGrow: "initial",
      minWidth: 288
    }
  });
}), j = c("div", {
  name: "MuiSnackbarContent",
  slot: "Message",
  overridesResolver: (o, t) => t.message
})({
  padding: "8px 0"
}), T = c("div", {
  name: "MuiSnackbarContent",
  slot: "Action",
  overridesResolver: (o, t) => t.action
})({
  display: "flex",
  alignItems: "center",
  marginLeft: "auto",
  paddingLeft: 16,
  marginRight: -8
}), O = /* @__PURE__ */ b.forwardRef(function(t, r) {
  const a = S({
    props: t,
    name: "MuiSnackbarContent"
  }), {
    action: i,
    className: m,
    message: d,
    role: f = "alert"
  } = a, u = g(a, w), s = a, n = N(s);
  return /* @__PURE__ */ v(M, p({
    role: f,
    square: !0,
    elevation: 6,
    className: C(n.root, m),
    ownerState: s,
    ref: r
  }, u, {
    children: [/* @__PURE__ */ l(j, {
      className: n.message,
      ownerState: s,
      children: d
    }), i ? /* @__PURE__ */ l(T, {
      className: n.action,
      ownerState: s,
      children: i
    }) : null]
  }));
});
process.env.NODE_ENV !== "production" && (O.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The action to display. It renders after the message, at the end of the snackbar.
   */
  action: e.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The message to display.
   */
  message: e.node,
  /**
   * The ARIA role attribute of the element.
   * @default 'alert'
   */
  role: e.string,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
});
export {
  O as default
};
