{"version":3,"file":"FormHelperText.mjs","sources":["../../../../../../../../node_modules/@mui/material/FormHelperText/FormHelperText.js"],"sourcesContent":["'use client';\n\nvar _span;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport formHelperTextClasses, { getFormHelperTextUtilityClasses } from \"./formHelperTextClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n  const {\n    classes,\n    contained,\n    size,\n    disabled,\n    error,\n    filled,\n    focused,\n    required\n  } = ownerState;\n  const slots = {\n    root: ['root', disabled && 'disabled', error && 'error', size && `size${capitalize(size)}`, contained && 'contained', focused && 'focused', filled && 'filled', required && 'required']\n  };\n  return composeClasses(slots, getFormHelperTextUtilityClasses, classes);\n};\nconst FormHelperTextRoot = styled('p', {\n  name: 'MuiFormHelperText',\n  slot: 'Root',\n  overridesResolver: (props, styles) => {\n    const {\n      ownerState\n    } = props;\n    return [styles.root, ownerState.size && styles[`size${capitalize(ownerState.size)}`], ownerState.contained && styles.contained, ownerState.filled && styles.filled];\n  }\n})(memoTheme(({\n  theme\n}) => ({\n  color: (theme.vars || theme).palette.text.secondary,\n  ...theme.typography.caption,\n  textAlign: 'left',\n  marginTop: 3,\n  marginRight: 0,\n  marginBottom: 0,\n  marginLeft: 0,\n  [`&.${formHelperTextClasses.disabled}`]: {\n    color: (theme.vars || theme).palette.text.disabled\n  },\n  [`&.${formHelperTextClasses.error}`]: {\n    color: (theme.vars || theme).palette.error.main\n  },\n  variants: [{\n    props: {\n      size: 'small'\n    },\n    style: {\n      marginTop: 4\n    }\n  }, {\n    props: ({\n      ownerState\n    }) => ownerState.contained,\n    style: {\n      marginLeft: 14,\n      marginRight: 14\n    }\n  }]\n})));\nconst FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {\n  const props = useDefaultProps({\n    props: inProps,\n    name: 'MuiFormHelperText'\n  });\n  const {\n    children,\n    className,\n    component = 'p',\n    disabled,\n    error,\n    filled,\n    focused,\n    margin,\n    required,\n    variant,\n    ...other\n  } = props;\n  const muiFormControl = useFormControl();\n  const fcs = formControlState({\n    props,\n    muiFormControl,\n    states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']\n  });\n  const ownerState = {\n    ...props,\n    component,\n    contained: fcs.variant === 'filled' || fcs.variant === 'outlined',\n    variant: fcs.variant,\n    size: fcs.size,\n    disabled: fcs.disabled,\n    error: fcs.error,\n    filled: fcs.filled,\n    focused: fcs.focused,\n    required: fcs.required\n  };\n\n  // This issue explains why this is required: https://github.com/mui/material-ui/issues/42184\n  delete ownerState.ownerState;\n  const classes = useUtilityClasses(ownerState);\n  return /*#__PURE__*/_jsx(FormHelperTextRoot, {\n    as: component,\n    className: clsx(classes.root, className),\n    ref: ref,\n    ...other,\n    ownerState: ownerState,\n    children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue\n    _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n      className: \"notranslate\",\n      \"aria-hidden\": true,\n      children: \"\\u200B\"\n    })) : children\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormHelperText.propTypes /* remove-proptypes */ = {\n  // ┌────────────────────────────── Warning ──────────────────────────────┐\n  // │ These PropTypes are generated from the TypeScript type definitions. │\n  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │\n  // └─────────────────────────────────────────────────────────────────────┘\n  /**\n   * The content of the component.\n   *\n   * If `' '` is provided, the component reserves one line height for displaying a future message.\n   */\n  children: PropTypes.node,\n  /**\n   * Override or extend the styles applied to the component.\n   */\n  classes: PropTypes.object,\n  /**\n   * @ignore\n   */\n  className: PropTypes.string,\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n  /**\n   * If `true`, the helper text should be displayed in a disabled state.\n   */\n  disabled: PropTypes.bool,\n  /**\n   * If `true`, helper text should be displayed in an error state.\n   */\n  error: PropTypes.bool,\n  /**\n   * If `true`, the helper text should use filled classes key.\n   */\n  filled: PropTypes.bool,\n  /**\n   * If `true`, the helper text should use focused classes key.\n   */\n  focused: PropTypes.bool,\n  /**\n   * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n   * FormControl.\n   */\n  margin: PropTypes.oneOf(['dense']),\n  /**\n   * If `true`, the helper text should use required classes key.\n   */\n  required: PropTypes.bool,\n  /**\n   * The system prop that allows defining system overrides as well as additional CSS styles.\n   */\n  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n  /**\n   * The variant to use.\n   */\n  variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])\n} : void 0;\nexport default FormHelperText;"],"names":["_span","useUtilityClasses","React.forwardRef","_jsx"],"mappings":";;;;;;;;;;;;AAEA,IAAIA,OAAK;AAaT,MAAMC,mBAAiB,GAAG,UAAU,IAAI;AACxC,EAAE,MAAM;AACR,IAAI,OAAO;AACX,IAAI,SAAS;AACb,IAAI,IAAI;AACR,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI;AACJ,GAAG,GAAG,UAAU;AAChB,EAAE,MAAM,KAAK,GAAG;AAChB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,IAAI,UAAU,EAAE,KAAK,IAAI,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,IAAI,WAAW,EAAE,OAAO,IAAI,S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