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