'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import React from 'react';
import { Button } from '../../Button/index.js';
import { Thumbnail } from '../../Thumbnail/index.js';
import { UploadActions } from '../../Upload/index.js';
import { FileMeta } from '../FileMeta/index.js';
import './index.scss';
const baseClass = 'file-details';
export const StaticFileDetails = (props)=>{
    const { customUploadActions, doc, enableAdjustments, handleRemove, hasImageSizes, hideRemoveFile, imageCacheTag, uploadConfig } = props;
    const { filename, filesize, height, mimeType, thumbnailURL, url, width } = doc;
    const previewAllowed = uploadConfig.displayPreview ?? true;
    return /*#__PURE__*/ _jsxDEV("div", {
        className: baseClass,
        children: /*#__PURE__*/ _jsxDEV("header", {
            children: [
                previewAllowed && /*#__PURE__*/ _jsxDEV(Thumbnail, {
                    // size="small"
                    className: `${baseClass}__thumbnail`,
                    doc: doc,
                    fileSrc: thumbnailURL || url,
                    imageCacheTag: imageCacheTag,
                    uploadConfig: uploadConfig
                }, void 0, false, {
                    fileName: "src/elements/FileDetails/StaticFileDetails/index.tsx",
                    lineNumber: 47,
                    columnNumber: 11
                }, this),
                /*#__PURE__*/ _jsxDEV("div", {
                    className: `${baseClass}__main-detail`,
                    children: [
                        /*#__PURE__*/ _jsxDEV(FileMeta, {
                            filename: filename,
                            filesize: filesize,
                            height: height,
                            mimeType: mimeType,
                            url: url,
                            width: width
                        }, void 0, false, {
                            fileName: "src/elements/FileDetails/StaticFileDetails/index.tsx",
                            lineNumber: 57,
                            columnNumber: 11
                        }, this),
                        (enableAdjustments || hasImageSizes && doc.filename || customUploadActions) && /*#__PURE__*/ _jsxDEV(UploadActions, {
                            customActions: customUploadActions,
                            enableAdjustments: Boolean(enableAdjustments),
                            enablePreviewSizes: hasImageSizes && doc.filename,
                            mimeType: mimeType
                        }, void 0, false, {
                            fileName: "src/elements/FileDetails/StaticFileDetails/index.tsx",
                            lineNumber: 67,
                            columnNumber: 13
                        }, this)
                    ]
                }, void 0, true, {
                    fileName: "src/elements/FileDetails/StaticFileDetails/index.tsx",
                    lineNumber: 56,
                    columnNumber: 9
                }, this),
                !hideRemoveFile && handleRemove && /*#__PURE__*/ _jsxDEV(Button, {
                    buttonStyle: "icon-label",
                    className: `${baseClass}__remove`,
                    icon: "x",
                    iconStyle: "with-border",
                    onClick: handleRemove,
                    round: true
                }, void 0, false, {
                    fileName: "src/elements/FileDetails/StaticFileDetails/index.tsx",
                    lineNumber: 76,
                    columnNumber: 11
                }, this)
            ]
        }, void 0, true, {
            fileName: "src/elements/FileDetails/StaticFileDetails/index.tsx",
            lineNumber: 45,
            columnNumber: 7
        }, this)
    }, void 0, false, {
        fileName: "src/elements/FileDetails/StaticFileDetails/index.tsx",
        lineNumber: 44,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map