"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__, {
    gridCardActionInitializers: ()=>gridCardActionInitializers
});
const SchemaInitializer_js_namespaceObject = require("../../../../application/schema-initializer/SchemaInitializer.js");
const index_js_namespaceObject = require("../../../../data-source/index.js");
const gridCardActionInitializers = new SchemaInitializer_js_namespaceObject.SchemaInitializer({
    name: 'gridCard:configureActions',
    title: "{{t('Configure actions')}}",
    icon: 'SettingOutlined',
    style: {
        marginLeft: 8
    },
    items: [
        {
            type: 'itemGroup',
            title: "{{t('Enable actions')}}",
            name: 'enableActions',
            children: [
                {
                    name: 'filter',
                    title: "{{t('Filter')}}",
                    Component: 'FilterActionInitializer',
                    schema: {
                        'x-align': 'left'
                    }
                },
                {
                    name: 'addNew',
                    title: "{{t('Add new')}}",
                    Component: 'CreateActionInitializer',
                    schema: {
                        'x-align': 'right',
                        'x-decorator': 'ACLActionProvider',
                        'x-acl-action-props': {
                            skipScopeCheck: true
                        }
                    },
                    useVisible () {
                        const collection = (0, index_js_namespaceObject.useCollection)();
                        return ![
                            'view',
                            'file',
                            'sql'
                        ].includes(collection.template) || (null == collection ? void 0 : collection.writableView);
                    }
                },
                {
                    name: 'refresh',
                    title: "{{t('Refresh')}}",
                    Component: 'RefreshActionInitializer',
                    schema: {
                        'x-align': 'right'
                    }
                },
                {
                    name: 'import',
                    title: "{{t('Import')}}",
                    Component: 'ImportActionInitializer',
                    schema: {
                        'x-align': 'right',
                        'x-acl-action': 'importXlsx',
                        'x-decorator': 'ACLActionProvider',
                        'x-acl-action-props': {
                            skipScopeCheck: true
                        }
                    },
                    useVisible () {
                        const collection = (0, index_js_namespaceObject.useCollection)();
                        return ('view' !== collection.template || (null == collection ? void 0 : collection.writableView)) && 'sql' !== collection.template;
                    }
                },
                {
                    name: 'export',
                    title: "{{t('Export')}}",
                    Component: 'ExportActionInitializer',
                    schema: {
                        'x-align': 'right',
                        'x-decorator': 'ACLActionProvider',
                        'x-acl-action-props': {
                            skipScopeCheck: true
                        }
                    }
                }
            ]
        }
    ]
});
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
});
