"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.Elevation = void 0;
var _context = require("../context");
var _view = require("../view");
var _hook = require("./hook");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * External dependencies
 */

/**
 * Internal dependencies
 */

function UnconnectedElevation(props, forwardedRef) {
  const elevationProps = (0, _hook.useElevation)(props);
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_view.View, {
    ...elevationProps,
    ref: forwardedRef
  });
}

/**
 * `Elevation` is a core component that renders shadow, using the component
 * system's shadow system.
 *
 * The shadow effect is generated using the `value` prop.
 *
 * ```jsx
 * import {
 *	__experimentalElevation as Elevation,
 *	__experimentalSurface as Surface,
 *	__experimentalText as Text,
 * } from '@wordpress/components';
 *
 * function Example() {
 *   return (
 *     <Surface>
 *       <Text>Code is Poetry</Text>
 *       <Elevation value={ 5 } />
 *     </Surface>
 *   );
 * }
 * ```
 */
const Elevation = exports.Elevation = (0, _context.contextConnect)(UnconnectedElevation, 'Elevation');
var _default = exports.default = Elevation;
//# sourceMappingURL=component.js.map