import { jsx, jsxs } from "react/jsx-runtime";
import "react";
import { theme } from "antd";
import { useCompile } from "../../../schema-component/index.mjs";
import { useSchemaInitializerItem } from "../context/index.mjs";
import { SchemaInitializerChildren } from "./SchemaInitializerChildren.mjs";
import { SchemaInitializerDivider } from "./SchemaInitializerDivider.mjs";
import { useSchemaInitializerStyles } from "./style.mjs";
const SchemaInitializerItemGroup = (param)=>{
    let { children, title, divider } = param;
    const compile = useCompile();
    const { componentCls } = useSchemaInitializerStyles();
    const { token } = theme.useToken();
    return /*#__PURE__*/ jsxs("div", {
        style: {
            marginInline: token.marginXXS
        },
        children: [
            divider && /*#__PURE__*/ jsx(SchemaInitializerDivider, {}),
            /*#__PURE__*/ jsx("div", {
                className: "".concat(componentCls, "-group-title"),
                children: compile(title)
            }),
            /*#__PURE__*/ jsx(SchemaInitializerChildren, {
                children: children
            })
        ]
    });
};
const SchemaInitializerItemGroupInternal = ()=>{
    const itemConfig = useSchemaInitializerItem();
    return /*#__PURE__*/ jsx(SchemaInitializerItemGroup, {
        ...itemConfig
    });
};
export { SchemaInitializerItemGroup, SchemaInitializerItemGroupInternal };
