import { formilyReact, CnRating as UiCnRating } from '@cainiaofe/cn-ui';
import React from 'react';
const { connect } = formilyReact;
export const Rating = connect((props) => {
    var _a, _b, _c;
    const ComponentUI = (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.cnLowCodeUtils) === null || _a === void 0 ? void 0 : _a.filterItem) === null || _b === void 0 ? void 0 : _b.getRunTimeItem) === null || _c === void 0 ? void 0 : _c.call(_b, 'Rating');
    // 如果低码组件不存在，使用 cn-ui 的组件作为回退
    if (!(ComponentUI === null || ComponentUI === void 0 ? void 0 : ComponentUI.formComponent)) {
        return (React.createElement(UiCnRating, { ...props, className: "cn-ai-table-schema-field__item--full-width cn-ai-table-schema-field__rating-padding" }));
    }
    const FormComponent = ComponentUI.formComponent;
    return (React.createElement(FormComponent, { ...props, className: "cn-ai-table-schema-field__item--full-width cn-ai-table-schema-field__rating-padding" }));
});
Rating.displayName = 'CnRating';
