import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
import * as __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__ from "../../../icon/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../../schema-component/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_initializer_hooks_useGetAriaLabelOfSchemaInitializer_mjs__ from "../../../schema-initializer/hooks/useGetAriaLabelOfSchemaInitializer.mjs";
const SchemaInitializerButton = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo((props)=>{
    const { style, options, ...others } = props;
    const compile = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useCompile)();
    const { getAriaLabel } = (0, __WEBPACK_EXTERNAL_MODULE__schema_initializer_hooks_useGetAriaLabelOfSchemaInitializer_mjs__.useGetAriaLabelOfSchemaInitializer)();
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Button, {
        "data-testid": options['data-testid'],
        "aria-label": getAriaLabel(),
        "aria-disabled": "false",
        type: 'dashed',
        style: {
            borderColor: 'var(--colorSettings)',
            color: 'var(--colorSettings)',
            ...style
        },
        icon: 'string' == typeof options.icon ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.Icon, {
            type: options.icon
        }) : options.icon,
        ...others,
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("span", {
            style: {
                overflow: 'hidden',
                textOverflow: 'ellipsis',
                whiteSpace: 'nowrap',
                display: 'inline-block',
                width: options.icon ? 'calc(100% - 14px)' : '100%',
                verticalAlign: 'bottom'
            },
            children: compile(options.title)
        })
    });
});
SchemaInitializerButton.displayName = 'SchemaInitializerButton(memo)';
export { SchemaInitializerButton };
