import { useDataBlockParentRecord, useDataBlockProps } from "../../index.mjs";
import { useSourceKey } from "./useSourceKey.mjs";
const useSourceId = ()=>{
    const { sourceId, association } = useDataBlockProps() || {};
    const sourceKey = useSourceKey(association);
    const sourceRecord = useDataBlockParentRecord({
        association
    });
    if (sourceId) return sourceId;
    return null == sourceRecord ? void 0 : sourceRecord[sourceKey];
};
export { useSourceId };
