import { jsx as _jsx } from "react/jsx-runtime";
import CodeModal from '../CodeModal';
import { ChatbotDisplayMode } from '../Chatbot';
export const AttachmentEdit = ({ fileName, code, handleModalToggle, isModalOpen, onCancel, onSave, title = 'Edit attachment', displayMode = ChatbotDisplayMode.default, isCompact, modalHeaderClassName, modalBodyClassName, modalFooterClassName, primaryActionButtonText = 'Save', secondaryActionButtonText = 'Cancel' }) => {
    const handleSave = (_event, code) => {
        handleModalToggle(_event);
        onSave(_event, code);
    };
    const handleCancel = (_event) => {
        handleModalToggle(_event);
        onCancel(_event);
    };
    return (_jsx(CodeModal, { code: code, fileName: fileName, handleModalToggle: handleModalToggle, isModalOpen: isModalOpen, onPrimaryAction: handleSave, onSecondaryAction: handleCancel, primaryActionBtn: primaryActionButtonText, secondaryActionBtn: secondaryActionButtonText, title: title, displayMode: displayMode, isCompact: isCompact, modalHeaderClassName: modalHeaderClassName, modalBodyClassName: modalBodyClassName, modalFooterClassName: modalFooterClassName }));
};
export default AttachmentEdit;
