// packages/components/src/card/card-media/hook.ts
import { useMemo } from "@wordpress/element";
import { useContextSystem } from "../../context/index.js";
import * as styles from "../styles.js";
import { useCx } from "../../utils/hooks/use-cx.js";
function useCardMedia(props) {
  const {
    className,
    ...otherProps
  } = useContextSystem(props, "CardMedia");
  const cx = useCx();
  const classes = useMemo(() => cx(
    styles.Media,
    styles.borderRadius,
    // This classname is added for legacy compatibility reasons.
    "components-card__media",
    className
  ), [className, cx]);
  return {
    ...otherProps,
    className: classes
  };
}
export {
  useCardMedia
};
//# sourceMappingURL=hook.js.map
