"use client"; import { useTranslation } from "../../../contexts/MessagesContext"; import Button from "../../buttons/Button"; import Stepper from "../../progress/Stepper"; import type { ModalFooterProps } from "./ModalFooter.types"; export function ModalFooterView({ showBackButton = false, showNextButton = false, onBack, onNext, backButtonText, nextButtonText, nextButtonDisabled = false, currentStep, totalSteps, footerContent, className = "", }: ModalFooterProps) { const t = useTranslation("common"); // Use localized defaults if text not provided const defaultBackText = backButtonText || t("buttons.back"); const defaultNextText = nextButtonText || t("buttons.next"); return (
{/* Back Button - Absolutely positioned bottom left */} {showBackButton && (
)} {/* Stepper (Centered) */} {currentStep && totalSteps && (
)} {/* Next Button - Absolutely positioned bottom right */} {showNextButton && (
)} {/* Custom Footer Content */} {footerContent}
); }