import * as React from 'react'; import { useRoomInfo } from '../hooks'; /** @public */ export interface RoomNameProps extends React.HTMLAttributes { childrenPosition?: 'before' | 'after'; } /** * The `RoomName` component renders the name of the connected LiveKit room inside a span tag. * * @example * ```tsx * * * * ``` * @public * * @param props - RoomNameProps */ export const RoomName: React.FC> = /* @__PURE__ */ React.forwardRef(function RoomName( { childrenPosition = 'before', children, ...htmlAttributes }: RoomNameProps, ref, ) { const { name } = useRoomInfo(); return ( {childrenPosition === 'before' && children} {name} {childrenPosition === 'after' && children} ); });