"use strict";

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

/**
 * Internal dependencies
 */

function UnconnectedCardHeader(props, forwardedRef) {
  const headerProps = (0, _hook.useCardHeader)(props);
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_flex.Flex, {
    ...headerProps,
    ref: forwardedRef
  });
}

/**
 * `CardHeader` renders an optional header within a `Card`.
 *
 * ```jsx
 * import { Card, CardBody, CardHeader } from `@wordpress/components`;
 *
 * <Card>
 * 	<CardHeader>...</CardHeader>
 * 	<CardBody>...</CardBody>
 * </Card>
 * ```
 */
const CardHeader = exports.CardHeader = (0, _context.contextConnect)(UnconnectedCardHeader, 'CardHeader');
var _default = exports.default = CardHeader;
//# sourceMappingURL=component.js.map