"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { TableConfigProvider } from "./TableConfigurationProvider.js";
import { tableHeader } from "./tableHeaderStyles.js";
import { useTableSectionConfig } from "./useTableSectionConfig.js";
/**
 * **Client Component**
 *
 * Creates a `<thead>` element with some basic styles. This component will also
 * update the table configuration so that all the `TableCell` children will
 * automatically become `<th>` elements instead of the normal `<td>` as well as
 * disabling the hover effect and line wrapping. The hover effect and
 * line-wrapping can be re-enabled if desired through the `hoverable` and
 * `disableNoWrap` props.
 */ export const TableHeader = /*#__PURE__*/ forwardRef(function TableHeader(props, propRef) {
    const { className, sticky, lineWrap, hoverable, children, ...remaining } = props;
    const config = useTableSectionConfig({
        type: "header",
        lineWrap,
        hoverable
    });
    const { dense } = config;
    return /*#__PURE__*/ _jsx(TableConfigProvider, {
        value: config,
        children: /*#__PURE__*/ _jsx("thead", {
            ...remaining,
            ref: propRef,
            className: tableHeader({
                className,
                dense,
                sticky
            }),
            children: children
        })
    });
});

//# sourceMappingURL=TableHeader.js.map