{"version":3,"file":"Backdrop.mjs","sources":["../../../../../../../../node_modules/@mui/material/Backdrop/Backdrop.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 useSlot from \"../utils/useSlot.js\";\nimport Fade from \"../Fade/index.js\";\nimport { getBackdropUtilityClass } from \"./backdropClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n  const {\n    classes,\n    invisible\n  } = ownerState;\n  const slots = {\n    root: ['root', invisible && 'invisible']\n  };\n  return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n  name: 'MuiBackdrop',\n  slot: 'Root',\n  overridesResolver: (props, styles) => {\n    const {\n      ownerState\n    } = props;\n    return [styles.root, ownerState.invisible && styles.invisible];\n  }\n})({\n  position: 'fixed',\n  display: 'flex',\n  alignItems: 'center',\n  justifyContent: 'center',\n  right: 0,\n  bottom: 0,\n  top: 0,\n  left: 0,\n  backgroundColor: 'rgba(0, 0, 0, 0.5)',\n  WebkitTapHighlightColor: 'transparent',\n  variants: [{\n    props: {\n      invisible: true\n    },\n    style: {\n      backgroundColor: 'transparent'\n    }\n  }]\n});\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n  const props = useDefaultProps({\n    props: inProps,\n    name: 'MuiBackdrop'\n  });\n  const {\n    children,\n    className,\n    component = 'div',\n    invisible = false,\n    open,\n    components = {},\n    componentsProps = {},\n    slotProps = {},\n    slots = {},\n    TransitionComponent: TransitionComponentProp,\n    transitionDuration,\n    ...other\n  } = props;\n  const ownerState = {\n    ...props,\n    component,\n    invisible\n  };\n  const classes = useUtilityClasses(ownerState);\n  const backwardCompatibleSlots = {\n    transition: TransitionComponentProp,\n    root: components.Root,\n    ...slots\n  };\n  const backwardCompatibleSlotProps = {\n    ...componentsProps,\n    ...slotProps\n  };\n  const externalForwardedProps = {\n    slots: backwardCompatibleSlots,\n    slotProps: backwardCompatibleSlotProps\n  };\n  const [RootSlot, rootProps] = useSlot('root', {\n    elementType: BackdropRoot,\n    externalForwardedProps,\n    className: clsx(classes.root, className),\n    ownerState\n  });\n  const [TransitionSlot, transitionProps] = useSlot('transition', {\n    elementType: Fade,\n    externalForwardedProps,\n    ownerState\n  });\n  return /*#__PURE__*/_jsx(TransitionSlot, {\n    in: open,\n    timeout: transitionDuration,\n    ...other,\n    ...transitionProps,\n    children: /*#__PURE__*/_jsx(RootSlot, {\n      \"aria-hidden\": true,\n      ...rootProps,\n      classes: classes,\n      ref: ref,\n      children: children\n    })\n  });\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.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   * 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   * The components used for each slot inside.\n   *\n   * @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n   *\n   * @default {}\n   */\n  components: PropTypes.shape({\n    Root: PropTypes.elementType\n  }),\n  /**\n   * The extra props for the slot components.\n   * You can override the existing props or add new ones.\n   *\n   * @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n   *\n   * @default {}\n   */\n  componentsProps: PropTypes.shape({\n    root: PropTypes.object\n  }),\n  /**\n   * If `true`, the backdrop is invisible.\n   * It can be used when rendering a popover or a custom select component.\n   * @default false\n   */\n  invisible: PropTypes.bool,\n  /**\n   * If `true`, the component is shown.\n   */\n  open: PropTypes.bool.isRequired,\n  /**\n   * The props used for each slot inside.\n   * @default {}\n   */\n  slotProps: PropTypes.shape({\n    root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n    transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n  }),\n  /**\n   * The components used for each slot inside.\n   * @default {}\n   */\n  slots: PropTypes.shape({\n    root: PropTypes.elementType,\n    transition: PropTypes.elementType\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 component used for the transition.\n   * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n   * @default Fade\n   * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n   */\n  TransitionComponent: PropTypes.elementType,\n  /**\n   * The duration for the transition, in milliseconds.\n   * You may specify a single timeout for all transitions, or individually with an object.\n   */\n  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n    appear: PropTypes.number,\n    enter: PropTypes.number,\n    exit: PropTypes.number\n  })])\n} : void 0;\nexport default Backdrop;"],"names":["useUtilityClasses","React.forwardRef","_jsx"],"mappings":";;;;;;;;;;AAYA,MAAMA,mBAAiB,GAAG,UAAU,IAAI;AACxC,EAAE,MAAM;AACR,IAAI,OAAO;AACX,IAAI;AACJ,GAAG,GAAG,UAAU;AAChB,EAAE,MAAM,KAAK,GAAG;AAChB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,IAAI,WAAW;AAC3C,GAAG;AACH,E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