{"version":3,"file":"FormGroup.mjs","sources":["../../../../../../../../node_modules/@mui/material/FormGroup/FormGroup.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getFormGroupUtilityClass } from \"./formGroupClasses.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n  const {\n    classes,\n    row,\n    error\n  } = ownerState;\n  const slots = {\n    root: ['root', row && 'row', error && 'error']\n  };\n  return composeClasses(slots, getFormGroupUtilityClass, classes);\n};\nconst FormGroupRoot = styled('div', {\n  name: 'MuiFormGroup',\n  slot: 'Root',\n  overridesResolver: (props, styles) => {\n    const {\n      ownerState\n    } = props;\n    return [styles.root, ownerState.row && styles.row];\n  }\n})({\n  display: 'flex',\n  flexDirection: 'column',\n  flexWrap: 'wrap',\n  variants: [{\n    props: {\n      row: true\n    },\n    style: {\n      flexDirection: 'row'\n    }\n  }]\n});\n\n/**\n * `FormGroup` wraps controls such as `Checkbox` and `Switch`.\n * It provides compact row layout.\n * For the `Radio`, you should be using the `RadioGroup` component instead of this one.\n */\nconst FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(inProps, ref) {\n  const props = useDefaultProps({\n    props: inProps,\n    name: 'MuiFormGroup'\n  });\n  const {\n    className,\n    row = false,\n    ...other\n  } = props;\n  const muiFormControl = useFormControl();\n  const fcs = formControlState({\n    props,\n    muiFormControl,\n    states: ['error']\n  });\n  const ownerState = {\n    ...props,\n    row,\n    error: fcs.error\n  };\n  const classes = useUtilityClasses(ownerState);\n  return /*#__PURE__*/_jsx(FormGroupRoot, {\n    className: clsx(classes.root, className),\n    ownerState: ownerState,\n    ref: ref,\n    ...other\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormGroup.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  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   * Display group of elements in a compact row.\n   * @default false\n   */\n  row: 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} : void 0;\nexport default FormGroup;"],"names":["useUtilityClasses","React.forwardRef","_jsx"],"mappings":";;;;;;;;;;AAYA,MAAMA,mBAAiB,GAAG,UAAU,IAAI;AACxC,EAAE,MAAM;AACR,IAAI,OAAO;AACX,IAAI,GAAG;AACP,IAAI;AACJ,GAAG,GAAG,UAAU;AAChB,EAAE,MAAM,KAAK,GAAG;AAChB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,IAAI,KAAK,EAAE,KAAK,IAAI,OAAO;AACjD,GAAG;AACH,EAAE,OAAO,cAAc,CAAC,KAAK,EAAE,wBAAwB,EAAE,OAAO,CAAC;AACjE,CAAC;AACD,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,EAAE;AACpC,EAAE,IAAI,EAAE,cAAc;AACtB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK;AACxC,IAAI,MAAM;AACV,MAAM;AACN,KAAK,GAAG,KAAK;AACb,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,CA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