{"version":3,"file":"FormControlLabel-SUrRzR1R.js","sources":["../../node_modules/@mui/material/FormControlLabel/formControlLabelClasses.js","../../node_modules/@mui/material/FormControlLabel/FormControlLabel.js"],"sourcesContent":["import { unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nimport generateUtilityClass from '../generateUtilityClass';\nexport function getFormControlLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControlLabel', slot);\n}\nconst formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error']);\nexport default formControlLabelClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"checked\", \"className\", \"componentsProps\", \"control\", \"disabled\", \"disableTypography\", \"inputRef\", \"label\", \"labelPlacement\", \"name\", \"onChange\", \"slotProps\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { useFormControl } from '../FormControl';\nimport Typography from '../Typography';\nimport capitalize from '../utils/capitalize';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport formControlLabelClasses, { getFormControlLabelUtilityClasses } from './formControlLabelClasses';\nimport formControlState from '../FormControl/formControlState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n labelPlacement,\n error\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error'],\n label: ['label', disabled && 'disabled']\n };\n return composeClasses(slots, getFormControlLabelUtilityClasses, classes);\n};\nexport const FormControlLabelRoot = styled('label', {\n name: 'MuiFormControlLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formControlLabelClasses.label}`]: styles.label\n }, styles.root, styles[`labelPlacement${capitalize(ownerState.labelPlacement)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n [`&.${formControlLabelClasses.disabled}`]: {\n cursor: 'default'\n }\n}, ownerState.labelPlacement === 'start' && {\n flexDirection: 'row-reverse',\n marginLeft: 16,\n // used for row presentation of radio/checkbox\n marginRight: -11\n}, ownerState.labelPlacement === 'top' && {\n flexDirection: 'column-reverse',\n marginLeft: 16\n}, ownerState.labelPlacement === 'bottom' && {\n flexDirection: 'column',\n marginLeft: 16\n}, {\n [`& .${formControlLabelClasses.label}`]: {\n [`&.${formControlLabelClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n }\n }\n}));\n\n/**\n * Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\nconst FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {\n var _slotProps$typography;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiFormControlLabel'\n });\n const {\n className,\n componentsProps = {},\n control,\n disabled: disabledProp,\n disableTypography,\n label: labelProp,\n labelPlacement = 'end',\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const muiFormControl = useFormControl();\n let disabled = disabledProp;\n if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {\n disabled = control.props.disabled;\n }\n if (typeof disabled === 'undefined' && muiFormControl) {\n disabled = muiFormControl.disabled;\n }\n const controlProps = {\n disabled\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['error']\n });\n const ownerState = _extends({}, props, {\n disabled,\n labelPlacement,\n error: fcs.error\n });\n const classes = useUtilityClasses(ownerState);\n const typographySlotProps = (_slotProps$typography = slotProps.typography) != null ? _slotProps$typography : componentsProps.typography;\n let label = labelProp;\n if (label != null && label.type !== Typography && !disableTypography) {\n label = /*#__PURE__*/_jsx(Typography, _extends({\n component: \"span\"\n }, typographySlotProps, {\n className: clsx(classes.label, typographySlotProps == null ? void 0 : typographySlotProps.className),\n children: label\n }));\n }\n return /*#__PURE__*/_jsxs(FormControlLabelRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [/*#__PURE__*/React.cloneElement(control, controlProps), label]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControlLabel.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 \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the component appears selected.\n */\n checked: PropTypes.bool,\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 props used for each slot inside.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n typography: PropTypes.object\n }),\n /**\n * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: PropTypes.element.isRequired,\n /**\n * If `true`, the control is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is rendered as it is passed without an additional typography node.\n */\n disableTypography: PropTypes.bool,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * A text or an element to be used in an enclosing label element.\n */\n label: PropTypes.node,\n /**\n * The position of the label.\n * @default 'end'\n */\n labelPlacement: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n /**\n * @ignore\n */\n name: PropTypes.string,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n typography: PropTypes.object\n }),\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 value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default FormControlLabel;"],"names":["getFormControlLabelUtilityClasses","slot","generateUtilityClass","formControlLabelClasses","generateUtilityClasses","formControlLabelClasses$1","_excluded","useUtilityClasses","ownerState","classes","disabled","labelPlacement","error","slots","capitalize","composeClasses","FormControlLabelRoot","styled","props","styles","theme","_extends","FormControlLabel","React.forwardRef","inProps","ref","_slotProps$typography","useThemeProps","className","componentsProps","control","disabledProp","disableTypography","labelProp","slotProps","other","_objectWithoutPropertiesLoose","muiFormControl","useFormControl","controlProps","key","fcs","formControlState","typographySlotProps","label","Typography","_jsx","clsx","_jsxs","React.cloneElement","FormControlLabel$1"],"mappings":"yIAEO,SAASA,EAAkCC,EAAM,CACtD,OAAOC,EAAqB,sBAAuBD,CAAI,CACzD,CACA,MAAME,EAA0BC,EAAuB,sBAAuB,CAAC,OAAQ,sBAAuB,oBAAqB,uBAAwB,WAAY,QAAS,OAAO,CAAC,EACxLC,EAAeF,ECJTG,EAAY,CAAC,UAAW,YAAa,kBAAmB,UAAW,WAAY,oBAAqB,WAAY,QAAS,iBAAkB,OAAQ,WAAY,YAAa,OAAO,EAenLC,EAAkCC,GAAA,CAChC,KAAA,CACJ,QAAAC,EACA,SAAAC,EACA,eAAAC,EACA,MAAAC,CACE,EAAAJ,EACEK,EAAQ,CACZ,KAAM,CAAC,OAAQH,GAAY,WAAY,iBAAiBI,EAAWH,CAAc,CAAC,GAA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