"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__, {
    createXlsxCollectionSchema: ()=>createXlsxCollectionSchema
});
const schema_namespaceObject = require("@tachybase/schema");
const createXlsxCollectionSchema = (filelist, filedata)=>{
    var _filelist_;
    return {
        type: 'object',
        properties: {
            [(0, schema_namespaceObject.uid)()]: {
                type: 'void',
                'x-decorator': 'FormV2',
                'x-component': 'Action.Drawer',
                'x-component-props': {
                    width: '70%'
                },
                'x-use-component-props': 'useFormBlockProps',
                properties: {
                    action: {
                        type: 'void',
                        'x-component': 'ActionBar',
                        'x-component-props': {
                            layout: 'one-column',
                            style: {
                                justifyContent: 'right'
                            }
                        },
                        properties: {
                            cancel: {
                                title: 'Cancel',
                                'x-component': 'Action',
                                'x-use-component-props': 'useCancelActionProps'
                            },
                            submit: {
                                title: '{{t("Submit")}}',
                                'x-component': 'Action',
                                'x-component-props': {
                                    type: 'primary',
                                    htmlType: 'submit'
                                },
                                'x-use-component-props': 'xlsxImportAction'
                            }
                        }
                    },
                    title: {
                        type: 'string',
                        default: null === (_filelist_ = filelist[0]) || void 0 === _filelist_ ? void 0 : _filelist_.name.replace(/\.[^/.]+$/, ''),
                        title: '{{ t("Collection display name") }}',
                        required: true,
                        'x-decorator': 'FormItem',
                        'x-component': 'Input'
                    },
                    name: {
                        type: 'string',
                        title: '{{t("Collection name")}}',
                        default: '{{ useNewId("t_") }}',
                        required: true,
                        'x-decorator': 'FormItem',
                        'x-component': 'Input',
                        'x-validator': 'uid',
                        description: "{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}"
                    },
                    category: {
                        title: '{{t("Categories")}}',
                        type: 'hasMany',
                        name: 'category',
                        'x-decorator': 'FormItem',
                        'x-component': 'Select',
                        'x-component-props': {
                            mode: 'multiple'
                        },
                        'x-reactions': [
                            '{{useAsyncDataSource(loadCategories)}}'
                        ]
                    },
                    description: {
                        title: '{{t("Description")}}',
                        type: 'string',
                        name: 'description',
                        'x-decorator': 'FormItem',
                        'x-component': 'Input.TextArea'
                    },
                    fields: {
                        type: 'array',
                        title: '{{t("Fields")}}',
                        default: filedata.fields,
                        'x-decorator': 'FormItem',
                        'x-component': 'xlsxFieldsConfigure',
                        'x-component-props': {
                            filedata
                        },
                        required: 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
});
