import r from "./index-extends.js";
import J from "./index-objectWithoutPropertiesLoose.js";
import * as K from "react";
import e from "./index-_virtual16.js";
import { clsx as Q } from "./index-clsx.js";
import X from "./index-styled.js";
import { getTextFieldUtilityClass as Y } from "./index-textFieldClasses.js";
import { jsx as p, jsxs as Z } from "react/jsx-runtime";
import { useDefaultProps as ee } from "./index-DefaultPropsProvider.js";
import oe from "./index-useId2.js";
import re from "./index-OutlinedInput.js";
import te from "./index-FilledInput.js";
import ne from "./index-Input2.js";
import le from "./index-InputLabel.js";
import se from "./index-Select2.js";
import ie from "./index-FormHelperText.js";
import ae from "./index-composeClasses.js";
import pe from "./index-FormControl2.js";
import ue from "./index-refType.js";
const de = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"], ce = {
  standard: ne,
  filled: te,
  outlined: re
}, me = (u) => {
  const {
    classes: t
  } = u;
  return ae({
    root: ["root"]
  }, Y, t);
}, fe = X(pe, {
  name: "MuiTextField",
  slot: "Root",
  overridesResolver: (u, t) => t.root
})({}), be = /* @__PURE__ */ K.forwardRef(function(t, h) {
  const d = ee({
    props: t,
    name: "MuiTextField"
  }), {
    autoComplete: C,
    autoFocus: x = !1,
    children: y,
    className: j,
    color: T = "primary",
    defaultValue: N,
    disabled: F = !1,
    error: g = !1,
    FormHelperTextProps: L,
    fullWidth: c = !1,
    helperText: m,
    id: S,
    InputLabelProps: s,
    inputProps: V,
    InputProps: W,
    inputRef: E,
    label: n,
    maxRows: _,
    minRows: q,
    multiline: P = !1,
    name: B,
    onBlur: H,
    onChange: M,
    onFocus: D,
    placeholder: U,
    required: w = !1,
    rows: k,
    select: i = !1,
    SelectProps: f,
    type: $,
    value: I,
    variant: a = "outlined"
  } = d, z = J(d, de), v = r({}, d, {
    autoFocus: x,
    color: T,
    disabled: F,
    error: g,
    fullWidth: c,
    multiline: P,
    required: w,
    select: i,
    variant: a
  }), A = me(v);
  process.env.NODE_ENV;
  const l = {};
  a === "outlined" && (s && typeof s.shrink < "u" && (l.notched = s.shrink), l.label = n), i && ((!f || !f.native) && (l.id = void 0), l["aria-describedby"] = void 0);
  const o = oe(S), b = m && o ? `${o}-helper-text` : void 0, R = n && o ? `${o}-label` : void 0, G = ce[a], O = /* @__PURE__ */ p(G, r({
    "aria-describedby": b,
    autoComplete: C,
    autoFocus: x,
    defaultValue: N,
    fullWidth: c,
    multiline: P,
    name: B,
    rows: k,
    maxRows: _,
    minRows: q,
    type: $,
    value: I,
    id: o,
    inputRef: E,
    onBlur: H,
    onChange: M,
    onFocus: D,
    placeholder: U,
    inputProps: V
  }, l, W));
  return /* @__PURE__ */ Z(fe, r({
    className: Q(A.root, j),
    disabled: F,
    error: g,
    fullWidth: c,
    ref: h,
    required: w,
    color: T,
    variant: a,
    ownerState: v
  }, z, {
    children: [n != null && n !== "" && /* @__PURE__ */ p(le, r({
      htmlFor: o,
      id: R
    }, s, {
      children: n
    })), i ? /* @__PURE__ */ p(se, r({
      "aria-describedby": b,
      id: o,
      labelId: R,
      value: I,
      input: O
    }, f, {
      children: y
    })) : O, m && /* @__PURE__ */ p(ie, r({
      id: b
    }, L, {
      children: m
    }))]
  }));
});
process.env.NODE_ENV !== "production" && (be.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * This prop helps users to fill forms faster, especially on mobile devices.
   * The name can be confusing, as it's more like an autofill.
   * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
   */
  autoComplete: e.string,
  /**
   * If `true`, the `input` element is focused during the first mount.
   * @default false
   */
  autoFocus: e.bool,
  /**
   * @ignore
   */
  children: e.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The color of the component.
   * It supports both default and custom theme colors, which can be added as shown in the
   * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
   * @default 'primary'
   */
  color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
  /**
   * The default value. Use when the component is not controlled.
   */
  defaultValue: e.any,
  /**
   * If `true`, the component is disabled.
   * @default false
   */
  disabled: e.bool,
  /**
   * If `true`, the label is displayed in an error state.
   * @default false
   */
  error: e.bool,
  /**
   * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
   */
  FormHelperTextProps: e.object,
  /**
   * If `true`, the input will take up the full width of its container.
   * @default false
   */
  fullWidth: e.bool,
  /**
   * The helper text content.
   */
  helperText: e.node,
  /**
   * The id of the `input` element.
   * Use this prop to make `label` and `helperText` accessible for screen readers.
   */
  id: e.string,
  /**
   * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.
   * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
   */
  InputLabelProps: e.object,
  /**
   * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
   */
  inputProps: e.object,
  /**
   * Props applied to the Input element.
   * It will be a [`FilledInput`](/material-ui/api/filled-input/),
   * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
   * component depending on the `variant` prop value.
   */
  InputProps: e.object,
  /**
   * Pass a ref to the `input` element.
   */
  inputRef: ue,
  /**
   * The label content.
   */
  label: e.node,
  /**
   * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
   * @default 'none'
   */
  margin: e.oneOf(["dense", "none", "normal"]),
  /**
   * Maximum number of rows to display when multiline option is set to true.
   */
  maxRows: e.oneOfType([e.number, e.string]),
  /**
   * Minimum number of rows to display when multiline option is set to true.
   */
  minRows: e.oneOfType([e.number, e.string]),
  /**
   * If `true`, a `textarea` element is rendered instead of an input.
   * @default false
   */
  multiline: e.bool,
  /**
   * Name attribute of the `input` element.
   */
  name: e.string,
  /**
   * @ignore
   */
  onBlur: e.func,
  /**
   * Callback fired when the value is changed.
   *
   * @param {object} event The event source of the callback.
   * You can pull out the new value by accessing `event.target.value` (string).
   */
  onChange: e.func,
  /**
   * @ignore
   */
  onFocus: e.func,
  /**
   * The short hint displayed in the `input` before the user enters a value.
   */
  placeholder: e.string,
  /**
   * If `true`, the label is displayed as required and the `input` element is required.
   * @default false
   */
  required: e.bool,
  /**
   * Number of rows to display when multiline option is set to true.
   */
  rows: e.oneOfType([e.number, e.string]),
  /**
   * Render a [`Select`](/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
   * If this option is set you must pass the options of the select as children.
   * @default false
   */
  select: e.bool,
  /**
   * Props applied to the [`Select`](/material-ui/api/select/) element.
   */
  SelectProps: e.object,
  /**
   * The size of the component.
   */
  size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
  /**
   * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
   */
  type: e.string,
  /**
   * The value of the `input` element, required for a controlled component.
   */
  value: e.any,
  /**
   * The variant to use.
   * @default 'outlined'
   */
  variant: e.oneOf(["filled", "outlined", "standard"])
});
export {
  be as default
};
