import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons__ from "@ant-design/icons";
const fileDef = {
    key: 'default',
    type: 'default',
    viewComponet: (params)=>{
        const { mimetype, file } = params;
        switch(true){
            case RegExp('image/').test(mimetype || (null == file ? void 0 : file.mimetype)):
                return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ViewComponentImageDefault, {
                    ...params
                });
            default:
                return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ViewComponentDefault, {
                    ...params
                });
        }
    },
    checkedComponent: (params)=>{
        const { mimetype, file } = params;
        switch(true){
            case RegExp('image/').test(mimetype || (null == file ? void 0 : file.mimetype)):
                return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(CheckedComponentImageDefault, {
                    ...params
                });
            default:
                return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(CheckedComponentDefault, {
                    ...params
                });
        }
    }
};
const ViewComponentImageDefault = (props)=>{
    const { file, prefixCls } = props;
    return file.imageUrl && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("img", {
        src: "".concat(file.imageUrl).concat(file.thumbnailRule || ''),
        style: {
            width: '100%',
            height: '100%'
        },
        alt: file.title,
        className: "".concat(prefixCls, "-list-item-image")
    });
};
const CheckedComponentImageDefault = (props)=>{
    const { file } = props;
    return file.imageUrl && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("img", {
        ...props,
        src: "".concat(file.imageUrl).concat(file.thumbnailRule || ''),
        alt: file.title,
        style: {
            width: '90%',
            height: 'auto',
            display: 'flex',
            justifyContent: 'center',
            alignItems: 'center'
        }
    });
};
const ViewComponentDefault = (props)=>{
    const { prefixCls } = props;
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_icons__.FileFilled, {
        className: "".concat(prefixCls, "-list-item-image"),
        style: {
            width: '100%',
            height: '100%',
            lineHeight: '100%',
            color: '#000000'
        }
    });
};
const CheckedComponentDefault = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_icons__.FileFilled, {
            style: {
                color: '#ffffff',
                fontSize: '30rem',
                display: 'block',
                lineHeight: '100vh'
            }
        })
    });
export { fileDef };
