import { jsx } from "react/jsx-runtime";
import "react";
import { connect, mapProps, mapReadPretty } from "@tachybase/schema";
import { LoadingOutlined } from "@ant-design/icons";
import { Input } from "antd";
import { Json } from "./Json.mjs";
import { ReadPretty } from "./ReadPretty.mjs";
const Input_Input = Object.assign(connect(Input, mapProps((props, field)=>({
        ...props,
        suffix: /*#__PURE__*/ jsx("span", {
            children: (null == field ? void 0 : field['loading']) || (null == field ? void 0 : field['validating']) ? /*#__PURE__*/ jsx(LoadingOutlined, {}) : props.suffix
        })
    })), mapReadPretty(ReadPretty.Input)), {
    TextArea: connect(Input.TextArea, mapProps((props, field)=>({
            autoSize: {
                maxRows: 10,
                minRows: 3
            },
            ...props
        })), mapReadPretty(ReadPretty.TextArea)),
    URL: connect(Input, mapReadPretty(ReadPretty.URL)),
    JSON: connect(Json, mapReadPretty(ReadPretty.JSON)),
    ReadPretty: ReadPretty.Input,
    Preview: ReadPretty.Preview
});
const input_Input = Input_Input;
export { Input_Input as Input, ReadPretty as InputReadPretty, input_Input as default };
