import * as __WEBPACK_EXTERNAL_MODULE__index_mjs__ from "../../index.mjs";
const useDataBlockParentRecord = (param)=>{
    let { association } = param;
    var _currentRecordCollection_getParentCollectionsName;
    const recordData = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCollectionRecordData)();
    const parentRecordData = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCollectionParentRecordData)();
    const cm = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCollectionManager)();
    const currentRecordCollection = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.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 ? void 0 : _currentRecordCollection_getParentCollectionsName.call(currentRecordCollection).includes(sourceCollection.name))) return recordData;
    return parentRecordData;
};
export { useDataBlockParentRecord };
