"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = (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 = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (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__, {
    gridCardItemActionInitializers: ()=>gridCardItemActionInitializers
});
const SchemaInitializer_js_namespaceObject = require("../../../../application/schema-initializer/SchemaInitializer.js");
const index_js_namespaceObject = require("../../../../data-source/index.js");
const gridCardItemActionInitializers = new SchemaInitializer_js_namespaceObject.SchemaInitializer({
    name: 'gridCard:configureItemActions',
    title: '{{t("Configure actions")}}',
    icon: 'SettingOutlined',
    items: [
        {
            type: 'itemGroup',
            title: '{{t("Enable actions")}}',
            name: '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: 'update-record',
                    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;
                    }
                }
            ]
        }
    ]
});
exports.gridCardItemActionInitializers = __webpack_exports__.gridCardItemActionInitializers;
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
    "gridCardItemActionInitializers"
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
Object.defineProperty(exports, '__esModule', {
    value: true
});
