import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE__application_index_mjs__ from "../../../application/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__ from "../../../application/schema-settings/SchemaSettings.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__ from "../../../collection-manager/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__ from "../../../schema-component/antd/action/Action.Designer.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__ from "../../../schema-settings/index.mjs";
const customizeUpdateRecordActionSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__.SchemaSettings({
    name: 'actionSettings:updateRecord',
    items: [
        {
            name: 'editButton',
            Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.ButtonEditor,
            useComponentProps () {
                const { buttonEditorProps } = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaToolbar)();
                return buttonEditorProps;
            }
        },
        {
            name: 'linkageRules',
            Component: __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.SchemaSettingsLinkageRules,
            useComponentProps () {
                const { name } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollection_deprecated)();
                const { linkageRulesProps } = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaToolbar)();
                return {
                    ...linkageRulesProps,
                    collectionName: name
                };
            }
        },
        {
            name: 'secondConFirm',
            Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.SecondConFirm
        },
        {
            name: 'assignFieldValues',
            Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.AssignedFieldValues
        },
        {
            name: 'afterSuccessfulSubmission',
            Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.AfterSuccess
        },
        {
            name: 'workflowConfig',
            Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.WorkflowConfig,
            useVisible () {
                var _fieldSchema_xactionsettings;
                const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
                return (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.isValid)(null == fieldSchema ? void 0 : null === (_fieldSchema_xactionsettings = fieldSchema['x-action-settings']) || void 0 === _fieldSchema_xactionsettings ? void 0 : _fieldSchema_xactionsettings.triggerWorkflows);
            }
        },
        {
            name: 'delete',
            sort: 100,
            Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.RemoveButton,
            useComponentProps () {
                const { removeButtonProps } = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useSchemaToolbar)();
                return removeButtonProps;
            }
        }
    ]
});
export { customizeUpdateRecordActionSettings };
