import { createValidationPartialObject as l, createValidationSchema as d, createValidationFullObject as s } from "../../../hook-form/RHFormProvider/schema.js";
function u({
  steps: a
}) {
  const o = (() => {
    const t = l({});
    return a.forEach((i) => {
      if (i.validationFunction) {
        const n = i.validationFunction();
        Object.assign(t, n);
      }
    }), d(
      s(t)
    );
  })(), e = a.map((t) => {
    let i = [];
    if (t.validationFunction) {
      const c = t.validationFunction();
      i = Object.keys(c);
    }
    return {
      ...t,
      // Incluir todas las propiedades del step original
      validationFields: i
      // Agregar validationFields calculados
    };
  });
  return {
    validationSchema: o,
    steps: e
  };
}
export {
  u as getStepsAndValidationSchema
};
