"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;
const jsx_runtime_1 = require("react/jsx-runtime");
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, 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 ((0, jsx_runtime_1.jsx)(CodeModal_1.default, { 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 }));
};
exports.AttachmentEdit = AttachmentEdit;
exports.default = exports.AttachmentEdit;
