"use strict";
/**
 * 查找引用字段配置面板适配器
 *
 * 将 field-system 定义的 FieldPanelProps 桥接到 LookupFieldConfigPanel 组件。
 * 创建和编辑场景共用同一个适配器。
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LookupFieldPanelAdapter = void 0;
const react_1 = __importDefault(require("react"));
const lookup_field_1 = require("../../../../../cn-ai-table/view/components/toolbar/components/add-field/lookup-field");
const LookupFieldPanelAdapter = ({ fieldLabel, columnCode, initialValue, isEditStatus, context, onSave, onCancel, }) => {
    const initialConfig = initialValue ? JSON.parse(initialValue) : undefined;
    return (react_1.default.createElement(lookup_field_1.LookupFieldConfigPanel, { fieldLabel: fieldLabel, columnCode: columnCode, initialConfig: initialConfig, isEditStatus: isEditStatus, bizRequestConfig: context.bizRequestConfig, context: context, onSave: (config) => {
            onSave(config);
        }, onCancel: onCancel }));
};
exports.LookupFieldPanelAdapter = LookupFieldPanelAdapter;
