import { useCallback } from "react";
import { useFieldSchema } from "@tachybase/schema";
import { useCollection_deprecated } from "../../../../collection-manager/index.mjs";
import { useCompile } from "../../../hooks/index.mjs";
const useGetAriaLabelOfDrawer = ()=>{
    const fieldSchema = useFieldSchema();
    const component = fieldSchema['x-component'];
    const compile = useCompile();
    let { name: collectionName } = useCollection_deprecated();
    let title = compile(fieldSchema.title);
    collectionName = collectionName ? "-".concat(collectionName) : '';
    title = title ? "-".concat(title) : '';
    const getAriaLabel = useCallback((postfix)=>{
        postfix = postfix ? "-".concat(postfix) : '';
        return "drawer-".concat(component).concat(collectionName).concat(title).concat(postfix);
    }, [
        collectionName,
        component,
        title
    ]);
    return {
        getAriaLabel
    };
};
export { useGetAriaLabelOfDrawer };
