"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__, {
    WelcomeCard: ()=>WelcomeCard
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const css_namespaceObject = require("@emotion/css");
const external_antd_namespaceObject = require("antd");
const external_react_i18next_namespaceObject = require("react-i18next");
const external_react_router_dom_namespaceObject = require("react-router-dom");
const index_js_namespaceObject = require("../../../api-client/index.js");
const external_schema_component_index_js_namespaceObject = require("../../../schema-component/index.js");
const external_AddNewButton_js_namespaceObject = require("./AddNewButton.js");
function _tagged_template_literal(strings, raw) {
    if (!raw) raw = strings.slice(0);
    return Object.freeze(Object.defineProperties(strings, {
        raw: {
            value: Object.freeze(raw)
        }
    }));
}
function _templateObject() {
    const data = _tagged_template_literal([
        "\n        max-width: 800px;\n        margin: 24px auto;\n      "
    ]);
    _templateObject = function() {
        return data;
    };
    return data;
}
function _templateObject1() {
    const data = _tagged_template_literal([
        "\n          margin-top: 48px;\n        "
    ]);
    _templateObject1 = function() {
        return data;
    };
    return data;
}
const WelcomeCard = ()=>{
    const { refresh } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
    const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
    const navigate = (0, external_react_router_dom_namespaceObject.useNavigate)();
    const api = (0, index_js_namespaceObject.useAPIClient)();
    const { data: schema } = (0, index_js_namespaceObject.useRequest)({
        url: "/uiSchemas:getJsonSchema/default-admin-menu"
    });
    (0, external_schema_component_index_js_namespaceObject.createDesignable)({
        t,
        api,
        refresh,
        current: null == schema ? void 0 : schema.data
    });
    const navigatePlugin = ()=>navigate('/_admin/system-services/plugin-manager');
    const openHomePage = ()=>window.open('https://tachybase.org', '_blank');
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Card, {
        className: (0, css_namespaceObject.css)(_templateObject()),
        children: [
            /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Typography.Title, {
                children: t('Welcome to the Tachy Platform!')
            }),
            /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Typography.Text, {
                children: t('The Tachy Platform is dedicated to creating a user-friendly application development environment, aiming to lower development barriers, enhance efficiency, and provide enterprise users and developers with one-stop solutions.')
            }),
            /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Flex, {
                justify: "flex-end",
                className: (0, css_namespaceObject.css)(_templateObject1()),
                children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
                    children: [
                        /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
                            onClick: openHomePage,
                            children: t('Official Website')
                        }),
                        /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
                            onClick: navigatePlugin,
                            children: t('Plugin Management')
                        }),
                        /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_AddNewButton_js_namespaceObject.AddNewButtonComponent, {})
                    ]
                })
            })
        ]
    });
};
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
});
