// ============================================================================
// Attachment Edit - Chatbot Code Snippet Editor
// ============================================================================
import React from 'react';
import CodeModal from '../CodeModal';
import { ChatbotDisplayMode } from '../Chatbot';
export const AttachmentEdit = ({ fileName, code, handleModalToggle, isModalOpen, onCancel, onSave, title = 'Edit attachment', displayMode = ChatbotDisplayMode.default, isCompact }) => {
    const handleSave = (_event, code) => {
        handleModalToggle(_event);
        onSave(_event, code);
    };
    const handleCancel = (_event) => {
        handleModalToggle(_event);
        onCancel(_event);
    };
    return (React.createElement(CodeModal, { code: code, fileName: fileName, handleModalToggle: handleModalToggle, isModalOpen: isModalOpen, onPrimaryAction: handleSave, onSecondaryAction: handleCancel, primaryActionBtn: "Save", secondaryActionBtn: "Cancel", title: title, displayMode: displayMode, isCompact: isCompact }));
};
export default AttachmentEdit;
