import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { handleDownloadFile } from '../utils/fileUtils';
import { Image } from './Image';
import { SideSheet } from '../../surfaces/SideSheet';
export const ImageViewerSideSheet = (props) => {
    const { title, width, imageObj, open, onClose, hideDownload, hidePrimaryText, hideSecondaryText } = props;
    const { t } = useTranslation();
    const handleDownloadImage = useCallback(() => {
        handleDownloadFile(imageObj === null || imageObj === void 0 ? void 0 : imageObj.filePath, imageObj === null || imageObj === void 0 ? void 0 : imageObj.fileName);
    }, [imageObj]);
    return (React.createElement(SideSheet, { title: title !== null && title !== void 0 ? title : t('Image Viewer'), buttonLabel: hideDownload ? null : t('Download'), width: width !== null && width !== void 0 ? width : '90vw', onSubmit: handleDownloadImage, open: open, onClose: onClose, contentHeight: "100%" }, React.createElement(Image, { imageObj: imageObj, hidePrimaryText: hidePrimaryText, hideSecondaryText: hideSecondaryText })));
};
//# sourceMappingURL=ImageViewerSideSheet.js.map