import { jsx as b } from "@emotion/react/jsx-runtime";
import { useModuleDictionary as h, getPropertyByString as x } from "@m4l/core";
import { useTheme as C } from "@mui/material";
import { forwardRef as S } from "react";
import { ActionCancelRootStyled as g } from "./slots/ActionsCancelSlots.js";
const v = S((t, r) => {
  const {
    color: n,
    className: w,
    endIcon: s,
    label: c,
    startIcon: i,
    skeletonWidth: d = t.size === "small" ? "60px" : "80px",
    dataTestid: m,
    disabled: e = !1,
    size: o,
    variant: a = "outlined",
    ...f
  } = t, { getLabel: p } = h(), l = C(), u = x(
    l.vars.palette,
    e ? "default" : n || "default",
    l.vars.palette.default
  ), y = {
    size: o,
    variant: a,
    paletteColor: u
  };
  return /* @__PURE__ */ b(
    g,
    {
      variant: a,
      color: "default",
      "data-testid": m,
      disabled: e,
      endIcon: s,
      label: c ?? p("common_actions.cancel"),
      ownerState: { ...y },
      skeletonWidth: d,
      startIcon: i,
      size: o,
      ref: r,
      ...f
    }
  );
});
v.displayName = "ActionCancel";
export {
  v as ActionCancel
};
