import * as __WEBPACK_EXTERNAL_MODULE__application_schema_initializer_SchemaInitializer_mjs__ from "../../../../application/schema-initializer/SchemaInitializer.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__ from "../../../../data-source/index.mjs";
const listActionInitializers = new __WEBPACK_EXTERNAL_MODULE__application_schema_initializer_SchemaInitializer_mjs__.SchemaInitializer({
    name: 'list:configureActions',
    title: "{{t('Configure actions')}}",
    icon: 'SettingOutlined',
    style: {
        marginLeft: 8
    },
    items: [
        {
            type: 'itemGroup',
            name: 'enableActions',
            title: "{{t('Enable actions')}}",
            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, __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__.useCollection)();
                        return ('view' !== collection.template || (null == collection ? void 0 : collection.writableView)) && 'file' !== collection.template && 'sql' !== collection.template;
                    }
                },
                {
                    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, __WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__.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
                        }
                    }
                }
            ]
        }
    ]
});
export { listActionInitializers };
