import { jsx, jsxs } from "react/jsx-runtime";
import { cx } from "antd-style";
import { Icon } from "../../../icon/index.mjs";
import { useStyles } from "./style.mjs";
const MediaCard = (props)=>{
    const { icon, color, title, layout = 'horizontal', onClick = ()=>{}, className, needHover = true } = props;
    const { styles } = useStyles();
    return /*#__PURE__*/ jsxs("div", {
        className: cx(styles.mediaCardStyle, {
            layout: 'vertical' === layout,
            'need-hover': needHover
        }, className),
        onClick: onClick,
        children: [
            /*#__PURE__*/ jsx("div", {
                className: "icon-wrapper",
                style: {
                    backgroundColor: null != color ? color : '#e5e5e5'
                },
                children: /*#__PURE__*/ jsx(Icon, {
                    className: "icon",
                    type: null != icon ? icon : 'AppstoreOutlined',
                    style: {
                        color: null != color ? color : '#e5e5e5'
                    }
                })
            }),
            /*#__PURE__*/ jsx("div", {
                className: "title",
                children: title
            })
        ]
    });
};
export { MediaCard };
