import { jsx, jsxs } from "react/jsx-runtime";
import "react";
import { Switch } from "antd";
import { useCompile } from "../../../schema-component/index.mjs";
import { useSchemaInitializerItem } from "../context/index.mjs";
import { SchemaInitializerItem } from "./SchemaInitializerItem.mjs";
const SchemaInitializerSwitch = (props)=>{
    const { title, checked, ...resets } = props;
    const compile = useCompile();
    return /*#__PURE__*/ jsx(SchemaInitializerItem, {
        ...resets,
        children: /*#__PURE__*/ jsxs("div", {
            style: {
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'space-between'
            },
            children: [
                compile(title),
                " ",
                /*#__PURE__*/ jsx(Switch, {
                    style: {
                        marginLeft: 20
                    },
                    size: 'small',
                    checked: checked
                })
            ]
        })
    });
};
const SchemaInitializerSwitchInternal = ()=>{
    const itemConfig = useSchemaInitializerItem();
    return /*#__PURE__*/ jsx(SchemaInitializerSwitch, {
        ...itemConfig
    });
};
export { SchemaInitializerSwitch, SchemaInitializerSwitchInternal };
