import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE_react_i18next__ from "react-i18next";
import * as __WEBPACK_EXTERNAL_MODULE__index_mjs__ from "../../index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__ from "../../../api-client/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__application_index_mjs__ from "../../../application/index.mjs";
const AssociationFilterDesignerDelete = ()=>{
    const itemConfig = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaInitializerItem)();
    const { refresh } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(__WEBPACK_EXTERNAL_MODULE__index_mjs__.SchemaComponentContext);
    const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    const api = (0, __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__.useAPIClient)();
    const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
    const dn = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.createDesignable)({
        t,
        api,
        refresh,
        current: fieldSchema
    });
    dn.loadAPIClientEvents();
    const handleClick = ()=>{
        dn.remove(fieldSchema);
    };
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__application_index_mjs__.SchemaInitializerItem, {
        onClick: handleClick,
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
            children: itemConfig.title
        })
    });
};
export { AssociationFilterDesignerDelete };
