import { useFieldSchema, useForm } from "@tachybase/schema";
import { useTranslation } from "react-i18next";
import { useCompile } from "../../../schema-component/index.mjs";
import { useActionContext } from "../../../schema-component/antd/action/index.mjs";
import { useCollectionManager } from "../../collection/CollectionManagerProvider.mjs";
import { useCollection } from "../../collection/CollectionProvider.mjs";
import { useDataSourceManager } from "../../data-source/DataSourceManagerProvider.mjs";
import { useDataSource } from "../../data-source/DataSourceProvider.mjs";
function useCollectionFieldContext() {
    const { t } = useTranslation();
    const collection = useCollection();
    const dataSourceManager = useDataSourceManager();
    const actionContext = useActionContext();
    const dataSource = useDataSource();
    const form = useForm();
    const fieldSchema = useFieldSchema();
    const collectionManager = useCollectionManager();
    const compile = useCompile();
    return {
        t,
        compile,
        actionContext,
        fieldSchema,
        collection,
        dataSource,
        form,
        collectionManager,
        dataSourceManager
    };
}
export { useCollectionFieldContext };
