/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Fragment, h, HTMLAttributes} from 'preact';
import {EntryType, isDocEntryWithSourceInfo, PipeEntry} from '../entities.mjs';
import {DocEntryRenderable, PipeEntryRenderable} from '../entities/renderables.mjs';
import {
HEADER_CLASS_NAME,
HEADER_ENTRY_CATEGORY,
HEADER_ENTRY_LABEL,
HEADER_ENTRY_TITLE,
} from '../styling/css-classes.mjs';
import {DocsPillRow} from './docs-pill-row';
/** Component to render a header of the API page. */
export function HeaderApi(props: {
entry: DocEntryRenderable | PipeEntryRenderable;
showFullDescription?: boolean;
hideDescription?: boolean;
}) {
const entry = props.entry;
// TODO: This link point to the main branch.
// When ADEV is not deployed on the main branch branch anymore,
// We should update it to point to the tag of the released version which ADEV runs on.
const sourceUrl = sourceUrlForEntry(entry);
return (
{entry.moduleName}
{entry.name}
{getEntryTypeDisplayName(entry.entryType)}
{statusTag(entry)}
{entry.entryType === EntryType.Pipe && !(entry as PipeEntry).isPure && (