import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE__data_source_DataSourceManager_mjs__ from "./data-source/DataSourceManager.mjs";
const isTitleField = (dm, field)=>{
    var _dm_collectionFieldInterfaceManager_getFieldInterface;
    return !field.isForeignKey && (null === (_dm_collectionFieldInterfaceManager_getFieldInterface = dm.collectionFieldInterfaceManager.getFieldInterface(field.interface)) || void 0 === _dm_collectionFieldInterfaceManager_getFieldInterface ? void 0 : _dm_collectionFieldInterfaceManager_getFieldInterface.titleUsable);
};
const useDataSourceHeaders = (dataSource)=>{
    const headers = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
        if (dataSource && dataSource !== __WEBPACK_EXTERNAL_MODULE__data_source_DataSourceManager_mjs__.DEFAULT_DATA_SOURCE_KEY) return {
            'x-data-source': dataSource
        };
    }, [
        dataSource
    ]);
    return headers;
};
export { isTitleField, useDataSourceHeaders };
