import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__application_index_mjs__ from "../../../application/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_initializer_items_ActionInitializer_mjs__ from "../../../schema-initializer/items/ActionInitializer.mjs";
const AssociateActionInitializer = ()=>{
    const schema = {
        type: 'void',
        'x-action': 'associate',
        'x-acl-action': 'associate',
        title: "{{t('Associate')}}",
        'x-toolbar': 'ActionSchemaToolbar',
        'x-settings': 'actionSettings:associate',
        'x-component': 'Action',
        'x-component-props': {
            actionType: 'associations',
            openMode: 'drawer',
            type: 'primary',
            icon: 'PlusOutlined'
        },
        properties: {
            drawer: {
                type: 'void',
                title: '{{ t("Select record") }}',
                'x-component': 'Action.Container',
                'x-component-props': {
                    className: 'nb-record-picker-selector'
                },
                'x-decorator': 'AssociateActionProvider',
                properties: {
                    grid: {
                        type: 'void',
                        'x-component': 'Grid',
                        'x-initializer': 'popup:tableSelector:addBlock',
                        properties: {}
                    },
                    footer: {
                        'x-component': 'Action.Container.Footer',
                        'x-component-props': {},
                        properties: {
                            actions: {
                                type: 'void',
                                'x-component': 'ActionBar',
                                'x-component-props': {},
                                properties: {
                                    submit: {
                                        title: '{{ t("Submit") }}',
                                        'x-action': 'submit',
                                        'x-component': 'Action',
                                        'x-use-component-props': 'usePickActionProps',
                                        'x-toolbar': 'ActionSchemaToolbar',
                                        'x-settings': 'actionSettings:submit',
                                        'x-component-props': {
                                            type: 'primary',
                                            htmlType: 'submit'
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    };
    const itemConfig = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaInitializerItem)();
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_initializer_items_ActionInitializer_mjs__.ActionInitializer, {
        item: itemConfig,
        schema: schema
    });
};
export { AssociateActionInitializer };
