import React from "react"; import { useTranslation } from 'react-i18next'; import CloseIcon from "../icons/CloseIcon"; // ─── Input field component ─────────────────────────────────────────────────── function InputField({ label, error, ...props }) { return (
{error &&

{error}

}
); } // ─── Image upload component ────────────────────────────────────────────────── function ImageUpload({ displayImage, imgError, compressing, fileInputRef, onFileChange, onRemove, }) { const { t } = useTranslation(); const MAX_SIZE_MB = 5; return (
{displayImage ? (
profile
) : ( )} {imgError &&

{imgError}

}

{t('profile.photoHint', { maxSize: MAX_SIZE_MB })}

); } // ─── Login field ───────────────────────────────────────────────────────────── function LoginField({ form, errors, onChange }) { const { t } = useTranslation(); return ( onChange("login", e.target.value)} /> ); } // ─── Name fields row ───────────────────────────────────────────────────────── function NameFieldsRow({ form, errors, onChange }) { const { t } = useTranslation(); return (
onChange("firstName", e.target.value)} /> onChange("lastName", e.target.value)} />
); } // ─── Contact fields ───────────────────────────────────────────────────────── function ContactFields({ form, errors, onChange, onPhoneChange }) { const { t } = useTranslation(); return ( <> onPhoneChange(e.target.value)} /> onChange("email", e.target.value)} /> ); } // ─── Submit button ────────────────────────────────────────────────────────── function SubmitButton({ loading, onSubmit }) { const { t } = useTranslation(); return ( ); } // ─── Modal header ────────────────────────────────────────────────────────── function ModalHeader({ onClose }) { const { t } = useTranslation(); return (
{t('profile.editTitle')}
); } export { InputField, ImageUpload, LoginField, NameFieldsRow, ContactFields, SubmitButton, ModalHeader };