import { useCollection, useCollectionManager, useCollectionParentRecordData, useCollectionRecordData } from "../../index.mjs";
const useDataBlockParentRecord = (param)=>{
    let { association } = param;
    var _currentRecordCollection_getParentCollectionsName;
    const recordData = useCollectionRecordData();
    const parentRecordData = useCollectionParentRecordData();
    const cm = useCollectionManager();
    const currentRecordCollection = useCollection();
    if (!association) return;
    const sourceCollection = cm.getCollection(association.split('.')[0]);
    if (currentRecordCollection.name === sourceCollection.name || (null == (_currentRecordCollection_getParentCollectionsName = currentRecordCollection.getParentCollectionsName) ? void 0 : _currentRecordCollection_getParentCollectionsName.call(currentRecordCollection).includes(sourceCollection.name))) return recordData;
    return parentRecordData;
};
export { useDataBlockParentRecord };
