import * as __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__ from "../../api-client/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__data_source_collection_field_CollectionFieldProvider_mjs__ from "../../data-source/collection-field/CollectionFieldProvider.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__record_provider_index_mjs__ from "../../record-provider/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../schema-component/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__useCollection_deprecated_mjs__ from "./useCollection_deprecated.mjs";
const useCollectionField_deprecated = ()=>{
    const collection = (0, __WEBPACK_EXTERNAL_MODULE__useCollection_deprecated_mjs__.useCollection_deprecated)();
    const record = (0, __WEBPACK_EXTERNAL_MODULE__record_provider_index_mjs__.useRecord)();
    const api = (0, __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__.useAPIClient)();
    const compile = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useCompile)();
    const ctx = (0, __WEBPACK_EXTERNAL_MODULE__data_source_collection_field_CollectionFieldProvider_mjs__.useCollectionField)();
    if (!ctx) return {};
    const resourceName = "".concat((null == ctx ? void 0 : ctx.collectionName) || (null == collection ? void 0 : collection.name), ".").concat(ctx.name);
    const resource = null == api ? void 0 : api.resource(resourceName, record[ctx.sourceKey]);
    return {
        ...ctx,
        uiSchema: compile(ctx.uiSchema),
        resource
    };
};
export { useCollectionField_deprecated };
