import { useCallback } from "react";
import { useFieldSchema } from "@tachybase/schema";
import { useCollection_deprecated } from "../../collection-manager/index.mjs";
const useGetAriaLabelOfSchemaInitializer = ()=>{
    const fieldSchema = useFieldSchema();
    const { name } = useCollection_deprecated();
    const getAriaLabel = useCallback((postfix)=>{
        if (!fieldSchema) return '';
        const initializer = fieldSchema['x-initializer'] ? "-".concat(fieldSchema['x-initializer']) : '';
        const collectionName = name ? "-".concat(name) : '';
        postfix = postfix ? "-".concat(postfix) : '';
        return "schema-initializer-".concat(fieldSchema['x-component']).concat(initializer).concat(collectionName).concat(postfix);
    }, [
        fieldSchema,
        name
    ]);
    return {
        getAriaLabel
    };
};
export { useGetAriaLabelOfSchemaInitializer };
