import { jsxs as f } from "@emotion/react/jsx-runtime";
import { useMemo as l, Children as m, isValidElement as S } from "react";
import { StepperFooterSectionStyled as A } from "../../slots/StepperSlot.js";
import { StepperFooterLeftActions as F } from "./subcomponents/StepperFooterLeftActions/index.js";
import { StepperFooterRightActions as u } from "./subcomponents/StepperFooterRightActions/index.js";
function d(i) {
  const { children: t } = i, { stepperFooterLeftActions: s, stepperFooterRightActions: c } = l(() => {
    let o = null, r = null, p = 0, n = 0;
    return t && m.forEach(t, (e) => {
      if (S(e)) {
        if (e.type === F) {
          if (p++, p > 1)
            throw new Error(
              "StepperFooter: Solo se permite un componente StepperFooterLeftActions. Se encontraron múltiples StepperFooterLeftActions."
            );
          o = e;
        } else if (e.type === u) {
          if (n++, n > 1)
            throw new Error(
              "StepperFooter: Solo se permite un componente StepperFooterRightActions. Se encontraron múltiples StepperFooterRightActions."
            );
          r = e;
        }
      }
    }), {
      stepperFooterLeftActions: o,
      stepperFooterRightActions: r
    };
  }, [t]);
  return /* @__PURE__ */ f(A, { "data-testid": "stepper-footer", children: [
    s,
    c
  ] });
}
export {
  d as StepperFooter
};
