import type { JSX } from "solid-js";
import { splitProps } from "solid-js";
import type { CardHeaderProps } from "./card.props";

/** The header section of a Card, typically containing a title and description. */
export function CardHeader(props: CardHeaderProps): JSX.Element {
  const [local, rest] = splitProps(props, ["children"]);
  return (
    <div data-scope="card" data-part="header" {...rest}>
      {local.children}
    </div>
  );
}
