import { jsx as _jsx } from "react/jsx-runtime";
import { cnb } from "cnbuilder";
import { forwardRef } from "react";
import { Typography } from "../typography/Typography.js";
import { bem } from "../utils/bem.js";
const styles = bem("rmd-app-bar-title");
/**
 * Apply the `className`s for a `AppBarTitle` component. This will be type-safe
 * if using typescript.
 *
 * @remarks \@since 6.0.0
 */ export function appBarTitle(options = {}) {
    const { className, keyline = "small" } = options;
    return cnb(styles({
        keyline: keyline == "list",
        "nav-keyline": keyline === "nav"
    }), className);
}
/**
 * **Server Component**
 *
 * @example
 * Updating the Keyline
 * ```tsx
 * import { AppBar, AppBarTitle } from "@react-md/core";
 * import type { ReactElement } from "react";
 *
 * function Example(): ReactElement {
 *   return (
 *     <AppBar>
 *       <AppBarTitle keyline="nav">
 *         Offset as if there was a nav button to the left
 *       </AppBarTitle>
 *     </AppBar>
 *   );
 * }
 * ```
 *
 * @remarks
 * \@since 6.0.0 Renamed the `noWrap` prop to `lineWrap` since the `AppBarTitle`
 * does not line wrap by default.
 * \@since 6.0.0 The {@link keyline} prop was changed from a boolean to a type
 * union of different keylines: {@link AppBarTitleKeyline}
 */ export const AppBarTitle = /*#__PURE__*/ forwardRef(function AppBarTitle(props, ref) {
    const { type = "headline-6", keyline = "small", children, className, textOverflow = "ellipsis", ...remaining } = props;
    return /*#__PURE__*/ _jsx(Typography, {
        ...remaining,
        ref: ref,
        type: type,
        className: appBarTitle({
            keyline,
            className
        }),
        textOverflow: textOverflow,
        children: children
    });
});

//# sourceMappingURL=AppBarTitle.js.map