'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { formatFilesize } from 'payload/shared';
import React from 'react';
import { CopyToClipboard } from '../../CopyToClipboard/index.js';
import './index.scss';
const baseClass = 'file-meta';
export const FileMeta = (props)=>{
    const { filename, filesize, height, mimeType, url: fileURL, width } = props;
    return /*#__PURE__*/ _jsxDEV("div", {
        className: baseClass,
        children: [
            /*#__PURE__*/ _jsxDEV("div", {
                className: `${baseClass}__url`,
                children: [
                    /*#__PURE__*/ _jsxDEV("a", {
                        href: fileURL,
                        rel: "noopener noreferrer",
                        target: "_blank",
                        children: filename
                    }, void 0, false, {
                        fileName: "src/elements/FileDetails/FileMeta/index.tsx",
                        lineNumber: 26,
                        columnNumber: 9
                    }, this),
                    /*#__PURE__*/ _jsxDEV(CopyToClipboard, {
                        defaultMessage: "Copy URL",
                        value: fileURL
                    }, void 0, false, {
                        fileName: "src/elements/FileDetails/FileMeta/index.tsx",
                        lineNumber: 29,
                        columnNumber: 9
                    }, this)
                ]
            }, void 0, true, {
                fileName: "src/elements/FileDetails/FileMeta/index.tsx",
                lineNumber: 25,
                columnNumber: 7
            }, this),
            /*#__PURE__*/ _jsxDEV("div", {
                className: `${baseClass}__size-type`,
                children: [
                    formatFilesize(filesize),
                    typeof width === 'number' && typeof height === 'number' && /*#__PURE__*/ _jsxDEV(React.Fragment, {
                        children: [
                            " - ",
                            width,
                            "x",
                            height
                        ]
                    }, void 0, true, {
                        fileName: "src/elements/FileDetails/FileMeta/index.tsx",
                        lineNumber: 34,
                        columnNumber: 11
                    }, this),
                    mimeType && /*#__PURE__*/ _jsxDEV(React.Fragment, {
                        children: [
                            " - ",
                            mimeType
                        ]
                    }, void 0, true, {
                        fileName: "src/elements/FileDetails/FileMeta/index.tsx",
                        lineNumber: 40,
                        columnNumber: 11
                    }, this)
                ]
            }, void 0, true, {
                fileName: "src/elements/FileDetails/FileMeta/index.tsx",
                lineNumber: 31,
                columnNumber: 7
            }, this)
        ]
    }, void 0, true, {
        fileName: "src/elements/FileDetails/FileMeta/index.tsx",
        lineNumber: 24,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map