import { ABORT_ERROR_MESSAGE } from '../../../constants';
export const useLogic = ({ fileId, fileName, fileSize, progress, selfFiles, setErrorStatusFile, }) => {
    const { controller } = selfFiles[fileId] || {};
    const handleAbort = () => {
        controller?.abort();
        setErrorStatusFile(fileId, ABORT_ERROR_MESSAGE);
    };
    return {
        abortButtonProps: {
            onClick: handleAbort,
        },
        fileName,
        fileSize,
        progress,
    };
};
