import { jsx as t } from "@emotion/react/jsx-runtime";
import { DICTIONARY as u } from "../../../dictionary.js";
import { useModuleDictionary as l, useEnvironment as b } from "@m4l/core";
import { useIsMobile as f } from "@m4l/graphics";
import { pathIcons as d } from "../../../icons.js";
import { useFormContext as I } from "react-hook-form";
import { IconButton as v } from "../../../../extended/mui/IconButton/IconButton.js";
import { CircularProgress as B } from "../../../../extended/mui/CircularProgress/CircularProgress.js";
import { LoadingButton as M } from "../../../../extended/mui/LoadingButton/LoadingButton.js";
function $(e) {
  const { label: i, forceIsMobile: o, ...s } = e, { getLabel: n } = l(), { host_static_assets: m, environment_assets: a } = b(), c = f(), p = o !== void 0 ? o : c, { formState: { isSubmitting: r } } = I();
  return p ? /* @__PURE__ */ t(
    v,
    {
      type: "submit",
      icon: r ? /* @__PURE__ */ t(B, { color: "default" }) : `${m}/${a}/${d.circleCheck}`,
      "data-testid": "stepper-prev-button",
      variant: "contained",
      color: "primary"
    }
  ) : /* @__PURE__ */ t(
    M,
    {
      type: "submit",
      label: i || n(u.LABEL_SUBMIT_BUTTON),
      variant: "contained",
      color: "primary",
      "data-testid": "stepper-submit-button",
      loading: r,
      ...s
    }
  );
}
export {
  $ as StepperSubmitButton
};
