"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AttachmentEdit = void 0;
// ============================================================================
// Attachment Edit - Chatbot Code Snippet Editor
// ============================================================================
const react_1 = __importDefault(require("react"));
const CodeModal_1 = __importDefault(require("../CodeModal"));
const Chatbot_1 = require("../Chatbot");
const AttachmentEdit = ({ fileName, code, handleModalToggle, isModalOpen, onCancel, onSave, title = 'Edit attachment', displayMode = Chatbot_1.ChatbotDisplayMode.default }) => {
    const handleSave = (_event, code) => {
        handleModalToggle(_event);
        onSave(_event, code);
    };
    const handleCancel = (_event) => {
        handleModalToggle(_event);
        onCancel(_event);
    };
    return (react_1.default.createElement(CodeModal_1.default, { code: code, fileName: fileName, handleModalToggle: handleModalToggle, isModalOpen: isModalOpen, onPrimaryAction: handleSave, onSecondaryAction: handleCancel, primaryActionBtn: "Save", secondaryActionBtn: "Cancel", title: title, displayMode: displayMode }));
};
exports.AttachmentEdit = AttachmentEdit;
exports.default = exports.AttachmentEdit;
