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__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../../schema-component/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__ from "../../../schema-settings/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__SchemaSettingsChildren_mjs__ from "./SchemaSettingsChildren.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__SchemaSettingsIcon_mjs__ from "./SchemaSettingsIcon.mjs";
const SchemaSettingsWrapper = (props)=>{
    const { items, Component = __WEBPACK_EXTERNAL_MODULE__SchemaSettingsIcon_mjs__.SchemaSettingsIcon, name, componentProps, style, ...others } = props;
    const { dn } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useDesignable)();
    const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
    const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    const cProps = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
            options: props,
            style,
            ...componentProps
        }), [
        componentProps,
        props,
        style
    ]);
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.SchemaSettingsDropdown, {
        title: /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(Component, cProps),
        dn: dn,
        field: field,
        fieldSchema: fieldSchema,
        ...others,
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__SchemaSettingsChildren_mjs__.SchemaSettingsChildren, {
            children: items
        })
    });
};
export { SchemaSettingsWrapper };
