2025-08-20 11:30:57 +01:00
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { createToolFlow } from "../components/tools/shared/createToolFlow";
|
|
|
|
import { useRemoveCertificateSignParameters } from "../hooks/tools/removeCertificateSign/useRemoveCertificateSignParameters";
|
|
|
|
import { useRemoveCertificateSignOperation } from "../hooks/tools/removeCertificateSign/useRemoveCertificateSignOperation";
|
2025-08-28 10:59:38 +01:00
|
|
|
import { useBaseTool } from "../hooks/tools/shared/useBaseTool";
|
2025-08-22 14:40:27 +01:00
|
|
|
import { BaseToolProps, ToolComponent } from "../types/tool";
|
2025-08-20 11:30:57 +01:00
|
|
|
|
2025-08-28 10:59:38 +01:00
|
|
|
const RemoveCertificateSign = (props: BaseToolProps) => {
|
2025-08-20 11:30:57 +01:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
2025-08-28 10:59:38 +01:00
|
|
|
const base = useBaseTool(
|
|
|
|
'removeCertificateSign',
|
|
|
|
useRemoveCertificateSignParameters,
|
|
|
|
useRemoveCertificateSignOperation,
|
|
|
|
props
|
|
|
|
);
|
2025-08-20 11:30:57 +01:00
|
|
|
|
|
|
|
return createToolFlow({
|
|
|
|
files: {
|
2025-08-28 10:59:38 +01:00
|
|
|
selectedFiles: base.selectedFiles,
|
|
|
|
isCollapsed: base.hasResults,
|
2025-08-20 11:30:57 +01:00
|
|
|
placeholder: t("removeCertSign.files.placeholder", "Select a PDF file in the main view to get started"),
|
|
|
|
},
|
|
|
|
steps: [],
|
|
|
|
executeButton: {
|
|
|
|
text: t("removeCertSign.submit", "Remove Signature"),
|
2025-08-28 10:59:38 +01:00
|
|
|
isVisible: !base.hasResults,
|
2025-08-20 11:30:57 +01:00
|
|
|
loadingText: t("loading"),
|
2025-08-28 10:59:38 +01:00
|
|
|
onClick: base.handleExecute,
|
|
|
|
disabled: !base.params.validateParameters() || !base.hasFiles || !base.endpointEnabled,
|
2025-08-20 11:30:57 +01:00
|
|
|
},
|
|
|
|
review: {
|
2025-08-28 10:59:38 +01:00
|
|
|
isVisible: base.hasResults,
|
|
|
|
operation: base.operation,
|
2025-08-20 11:30:57 +01:00
|
|
|
title: t("removeCertSign.results.title", "Certificate Removal Results"),
|
2025-08-28 10:59:38 +01:00
|
|
|
onFileClick: base.handleThumbnailClick,
|
2025-09-02 15:09:05 +01:00
|
|
|
onUndo: base.handleUndo,
|
2025-08-20 11:30:57 +01:00
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2025-08-22 14:40:27 +01:00
|
|
|
// Static method to get the operation hook for automation
|
|
|
|
RemoveCertificateSign.tool = () => useRemoveCertificateSignOperation;
|
|
|
|
|
2025-08-28 10:59:38 +01:00
|
|
|
export default RemoveCertificateSign as ToolComponent;
|