"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
(()=>{
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    listItemActionInitializers: ()=>listItemActionInitializers
});
const SchemaInitializer_js_namespaceObject = require("../../../../application/schema-initializer/SchemaInitializer.js");
const index_js_namespaceObject = require("../../../../data-source/index.js");
const listItemActionInitializers = new SchemaInitializer_js_namespaceObject.SchemaInitializer({
    name: 'list:configureItemActions',
    title: '{{t("Configure actions")}}',
    icon: 'SettingOutlined',
    items: [
        {
            type: 'itemGroup',
            name: 'enableActions',
            title: '{{t("Enable actions")}}',
            children: [
                {
                    name: 'view',
                    title: '{{t("View")}}',
                    Component: 'ViewActionInitializer',
                    schema: {
                        'x-component': 'Action.Link',
                        'x-action': 'view',
                        'x-decorator': 'ACLActionProvider',
                        'x-align': 'left'
                    }
                },
                {
                    name: 'edit',
                    title: '{{t("Edit")}}',
                    Component: 'UpdateActionInitializer',
                    schema: {
                        'x-component': 'Action.Link',
                        'x-action': 'update',
                        'x-decorator': 'ACLActionProvider',
                        'x-align': 'left'
                    },
                    useVisible () {
                        const collection = (0, index_js_namespaceObject.useCollection)();
                        return ('view' !== collection.template || (null == collection ? void 0 : collection.writableView)) && 'sql' !== collection.template;
                    }
                },
                {
                    name: 'delete',
                    title: '{{t("Delete")}}',
                    Component: 'DestroyActionInitializer',
                    schema: {
                        'x-component': 'Action.Link',
                        'x-action': 'destroy',
                        'x-decorator': 'ACLActionProvider',
                        'x-align': 'left'
                    },
                    useVisible () {
                        const collection = (0, index_js_namespaceObject.useCollection)();
                        return 'sql' !== collection.template;
                    }
                }
            ]
        },
        {
            name: 'divider',
            type: 'divider'
        },
        {
            type: 'subMenu',
            title: '{{t("Customize")}}',
            name: 'customize',
            children: [
                {
                    name: 'popup',
                    title: '{{t("Popup")}}',
                    Component: 'PopupActionInitializer',
                    useComponentProps () {
                        return {
                            'x-component': 'Action.Link'
                        };
                    }
                },
                {
                    name: 'updateRecord',
                    title: '{{t("Update record")}}',
                    Component: 'UpdateRecordActionInitializer',
                    useVisible () {
                        const collection = (0, index_js_namespaceObject.useCollection)();
                        return ('view' !== collection.template || (null == collection ? void 0 : collection.writableView)) && 'sql' !== collection.template;
                    }
                },
                {
                    name: 'customRequest',
                    title: '{{t("Custom request")}}',
                    Component: 'CustomRequestInitializer',
                    schema: {
                        'x-action': 'customize:table:request'
                    },
                    useVisible () {
                        const collection = (0, index_js_namespaceObject.useCollection)();
                        return ('view' !== collection.template || (null == collection ? void 0 : collection.writableView)) && 'sql' !== collection.template;
                    }
                }
            ]
        }
    ]
});
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
