{"version":3,"file":"Select.mjs","sources":["../../../../../../../../node_modules/@mui/material/Select/Select.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport deepmerge from '@mui/utils/deepmerge';\nimport composeClasses from '@mui/utils/composeClasses';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport SelectInput from \"./SelectInput.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport ArrowDropDownIcon from \"../internal/svg-icons/ArrowDropDown.js\";\nimport Input from \"../Input/index.js\";\nimport NativeSelectInput from \"../NativeSelect/NativeSelectInput.js\";\nimport FilledInput from \"../FilledInput/index.js\";\nimport OutlinedInput from \"../OutlinedInput/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { getSelectUtilityClasses } from \"./selectClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n  const {\n    classes\n  } = ownerState;\n  const slots = {\n    root: ['root']\n  };\n  const composedClasses = composeClasses(slots, getSelectUtilityClasses, classes);\n  return {\n    ...classes,\n    ...composedClasses\n  };\n};\nconst styledRootConfig = {\n  name: 'MuiSelect',\n  overridesResolver: (props, styles) => styles.root,\n  shouldForwardProp: prop => rootShouldForwardProp(prop) && prop !== 'variant',\n  slot: 'Root'\n};\nconst StyledInput = styled(Input, styledRootConfig)('');\nconst StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');\nconst StyledFilledInput = styled(FilledInput, styledRootConfig)('');\nconst Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {\n  const props = useDefaultProps({\n    name: 'MuiSelect',\n    props: inProps\n  });\n  const {\n    autoWidth = false,\n    children,\n    classes: classesProp = {},\n    className,\n    defaultOpen = false,\n    displayEmpty = false,\n    IconComponent = ArrowDropDownIcon,\n    id,\n    input,\n    inputProps,\n    label,\n    labelId,\n    MenuProps,\n    multiple = false,\n    native = false,\n    onClose,\n    onOpen,\n    open,\n    renderValue,\n    SelectDisplayProps,\n    variant: variantProp = 'outlined',\n    ...other\n  } = props;\n  const inputComponent = native ? NativeSelectInput : SelectInput;\n  const muiFormControl = useFormControl();\n  const fcs = formControlState({\n    props,\n    muiFormControl,\n    states: ['variant', 'error']\n  });\n  const variant = fcs.variant || variantProp;\n  const ownerState = {\n    ...props,\n    variant,\n    classes: classesProp\n  };\n  const classes = useUtilityClasses(ownerState);\n  const {\n    root,\n    ...restOfClasses\n  } = classes;\n  const InputComponent = input || {\n    standard: /*#__PURE__*/_jsx(StyledInput, {\n      ownerState: ownerState\n    }),\n    outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {\n      label: label,\n      ownerState: ownerState\n    }),\n    filled: /*#__PURE__*/_jsx(StyledFilledInput, {\n      ownerState: ownerState\n    })\n  }[variant];\n  const inputComponentRef = useForkRef(ref, getReactElementRef(InputComponent));\n  return /*#__PURE__*/_jsx(React.Fragment, {\n    children: /*#__PURE__*/React.cloneElement(InputComponent, {\n      // Most of the logic is implemented in `SelectInput`.\n      // The `Select` component is a simple API wrapper to expose something better to play with.\n      inputComponent,\n      inputProps: {\n        children,\n        error: fcs.error,\n        IconComponent,\n        variant,\n        type: undefined,\n        // We render a select. We can ignore the type provided by the `Input`.\n        multiple,\n        ...(native ? {\n          id\n        } : {\n          autoWidth,\n          defaultOpen,\n          displayEmpty,\n          labelId,\n          MenuProps,\n          onClose,\n          onOpen,\n          open,\n          renderValue,\n          SelectDisplayProps: {\n            id,\n            ...SelectDisplayProps\n          }\n        }),\n        ...inputProps,\n        classes: inputProps ? deepmerge(restOfClasses, inputProps.classes) : restOfClasses,\n        ...(input ? input.props.inputProps : {})\n      },\n      ...((multiple && native || displayEmpty) && variant === 'outlined' ? {\n        notched: true\n      } : {}),\n      ref: inputComponentRef,\n      className: clsx(InputComponent.props.className, className, classes.root),\n      // If a custom input is provided via 'input' prop, do not allow 'variant' to be propagated to it's root element. See https://github.com/mui/material-ui/issues/33894.\n      ...(!input && {\n        variant\n      }),\n      ...other\n    })\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? Select.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   * If `true`, the width of the popover will automatically be set according to the items inside the\n   * menu, otherwise it will be at least the width of the select input.\n   * @default false\n   */\n  autoWidth: PropTypes.bool,\n  /**\n   * The option elements to populate the select with.\n   * Can be some `MenuItem` when `native` is false and `option` when `native` is true.\n   *\n   * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.\n   */\n  children: PropTypes.node,\n  /**\n   * Override or extend the styles applied to the component.\n   * @default {}\n   */\n  classes: PropTypes.object,\n  /**\n   * @ignore\n   */\n  className: PropTypes.string,\n  /**\n   * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).\n   * You can only use it when the `native` prop is `false` (default).\n   * @default false\n   */\n  defaultOpen: PropTypes.bool,\n  /**\n   * The default value. Use when the component is not controlled.\n   */\n  defaultValue: PropTypes.any,\n  /**\n   * If `true`, a value is displayed even if no items are selected.\n   *\n   * In order to display a meaningful value, a function can be passed to the `renderValue` prop which\n   * returns the value to be displayed when no items are selected.\n   *\n   * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.\n   * The label should either be hidden or forced to a shrunk state.\n   * @default false\n   */\n  displayEmpty: PropTypes.bool,\n  /**\n   * The icon that displays the arrow.\n   * @default ArrowDropDownIcon\n   */\n  IconComponent: PropTypes.elementType,\n  /**\n   * The `id` of the wrapper element or the `select` element when `native`.\n   */\n  id: PropTypes.string,\n  /**\n   * An `Input` element; does not have to be a material-ui specific `Input`.\n   */\n  input: PropTypes.element,\n  /**\n   * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n   * When `native` is `true`, the attributes are applied on the `select` element.\n   */\n  inputProps: PropTypes.object,\n  /**\n   * See [OutlinedInput#label](https://mui.com/material-ui/api/outlined-input/#props)\n   */\n  label: PropTypes.node,\n  /**\n   * The ID of an element that acts as an additional label. The Select will\n   * be labelled by the additional label and the selected value.\n   */\n  labelId: PropTypes.string,\n  /**\n   * Props applied to the [`Menu`](https://mui.com/material-ui/api/menu/) element.\n   */\n  MenuProps: PropTypes.object,\n  /**\n   * If `true`, `value` must be an array and the menu will support multiple selections.\n   * @default false\n   */\n  multiple: PropTypes.bool,\n  /**\n   * If `true`, the component uses a native `select` element.\n   * @default false\n   */\n  native: PropTypes.bool,\n  /**\n   * Callback fired when a menu item is selected.\n   *\n   * @param {SelectChangeEvent<Value>} event The event source of the callback.\n   * You can pull out the new value by accessing `event.target.value` (any).\n   * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.\n   * @param {object} [child] The react element that was selected when `native` is `false` (default).\n   */\n  onChange: PropTypes.func,\n  /**\n   * Callback fired when the component requests to be closed.\n   * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).\n   *\n   * @param {object} event The event source of the callback.\n   */\n  onClose: PropTypes.func,\n  /**\n   * Callback fired when the component requests to be opened.\n   * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).\n   *\n   * @param {object} event The event source of the callback.\n   */\n  onOpen: PropTypes.func,\n  /**\n   * If `true`, the component is shown.\n   * You can only use it when the `native` prop is `false` (default).\n   */\n  open: PropTypes.bool,\n  /**\n   * Render the selected value.\n   * You can only use it when the `native` prop is `false` (default).\n   *\n   * @param {any} value The `value` provided to the component.\n   * @returns {ReactNode}\n   */\n  renderValue: PropTypes.func,\n  /**\n   * Props applied to the clickable div element.\n   */\n  SelectDisplayProps: PropTypes.object,\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 `input` value. Providing an empty string will select no options.\n   * Set to an empty string `''` if you don't want any of the available options to be selected.\n   *\n   * If the value is an object it must have reference equality with the option in order to be selected.\n   * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.\n   */\n  value: PropTypes.oneOfType([PropTypes.oneOf(['']), PropTypes.any]),\n  /**\n   * The variant to use.\n   * @default 'outlined'\n   */\n  variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nSelect.muiName = 'Select';\nexport default Select;"],"names":["useUtilityClasses","Select","React.forwardRef","_jsx","React.Fragment","React.cloneElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,mBAAiB,GAAG,UAAU,IAAI;AACxC,EAAE,MAAM;AACR,IAAI;AACJ,GAAG,GAAG,UAAU;AAChB,EAAE,MAAM,KAAK,GAAG;AAChB,IAAI,IAAI,EAAE,CAAC,MAAM;AACjB,GAAG;AACH,EAAE,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,EAAE,uBAAuB,EAAE,OAAO,CAAC;AACjF,EAAE,OAAO;AACT,IAAI,GAAG,OAAO;AACd,IAAI,GAAG;AACP,GAAG;AACH,CAAC;AACD,MAAM,gBAAgB,GAAG;AACzB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,IAAI;AACnD,EAAE,iBAAiB,EAAE,IAAI,IAAI,qBAAqB,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,SAAS;AAC9E,EAAE,IAAI,EAAE;AACR,CAAC;AACD,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC;AACvD,MAAM,mBAAmB,GAAG,MAAM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