import { Ref } from 'vue';
import { Doc } from '../../../core';
import { FieldManifest } from '../../../capabilities/field-manifest';
import { AttachFieldTarget } from '../../../domain/field/attach-field';
export type PanelPropsWriteContext = {
    manifest?: FieldManifest;
    valuePath?: string;
};
export type PanelPropsWriteResult = {
    defaults?: Record<string, any>;
};
export type PanelPropsSource = {
    key: () => string | undefined;
    read: () => Record<string, any> | null | undefined;
    write: (next: Record<string, any>, ctx: PanelPropsWriteContext) => PanelPropsWriteResult;
};
/** 对扁平 props 应用 manifest 计算规则 */
export declare function applyFlatPropsManifestComputed(props: Record<string, any>, manifest: FieldManifest | undefined, valuePath?: string): {
    props: Record<string, any>;
    defaults?: Record<string, any>;
};
/** 画布组件 props 读写 */
export declare function createWidgetPropsSource(targetRef: Ref<{
    id: string;
} | undefined>, propsPath: string, watchKeys?: string[]): PanelPropsSource;
/** 引用字段 props 读写 */
export declare function createAttachFieldPropsSource(getDoc: () => Doc, getTarget: () => AttachFieldTarget | null | undefined): PanelPropsSource;
/** 字段面板：画布字段 / 引用字段二选一 */
export declare function createFieldPanelPropsSource(options: {
    widgetMetaRef: Ref<{
        id: string;
    } | undefined>;
    isAttachMode: () => boolean;
    getDoc: () => Doc;
    getAttachTarget: () => AttachFieldTarget | null | undefined;
}): PanelPropsSource;
