import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
import * as __WEBPACK_EXTERNAL_MODULE__schema_templates_index_mjs__ from "../../../schema-templates/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__block_item_index_mjs__ from "../block-item/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__style_mjs__ from "./style.mjs";
const CardItem = (props)=>{
    const { children, name, ...restProps } = props;
    const template = (0, __WEBPACK_EXTERNAL_MODULE__schema_templates_index_mjs__.useSchemaTemplate)();
    const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    const templateKey = null == fieldSchema ? void 0 : fieldSchema['x-template-key'];
    const { styles } = (0, __WEBPACK_EXTERNAL_MODULE__style_mjs__["default"])();
    return templateKey && !template ? null : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__block_item_index_mjs__.BlockItem, {
        name: name,
        className: "".concat(styles, " tb-card-item"),
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Card, {
            className: "card",
            bordered: false,
            ...restProps,
            children: props.children
        })
    });
};
export { CardItem };
