import type { CollapsibleRootProps, CollapsibleRootEmits } from 'reka-ui'; import type { VNode } from 'vue'; import type { TocLink } from '@nuxt/content'; import type { AppConfig } from '@nuxt/schema'; import theme from '#build/b24ui/content/content-toc'; import type { IconComponent } from '../../types'; import type { ComponentConfig } from '../../types/tv'; type ContentToc = ComponentConfig; export type ContentTocLink = TocLink & { class?: any; b24ui?: Pick; }; /** * @memo We not support: color, highlight, highlightColor, highlightVariant * @todo refactoring is necessary */ export interface ContentTocProps extends Pick { /** * The element or component this component should render as. * @defaultValue 'nav' */ as?: any; /** * The icon displayed to collapse the content. * @defaultValue icons.chevronDown * @IconComponent */ trailingIcon?: IconComponent; /** * The title of the table of contents. * @defaultValue t('contentToc.title') */ title?: string; links?: T[]; class?: any; b24ui?: ContentToc['slots']; } export type ContentTocEmits = CollapsibleRootEmits & { move: [id: string]; }; type SlotProps = (props: { link: T; }) => VNode[]; export interface ContentTocSlots { leading?(props: { open: boolean; b24ui: ContentToc['b24ui']; }): VNode[]; default?(props: { open: boolean; }): VNode[]; trailing?(props: { open: boolean; b24ui: ContentToc['b24ui']; }): VNode[]; content?(props: { links: T[]; }): VNode[]; link?: SlotProps; top?(props: { links?: T[]; }): VNode[]; bottom?(props: { links?: T[]; }): VNode[]; } declare const _default: typeof __VLS_export; export default _default; declare const __VLS_export: (__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal & { "onUpdate:open"?: ((value: boolean) => any) | undefined; onMove?: ((id: string) => any) | undefined; }> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: ContentTocSlots; emit: ((evt: "update:open", value: boolean) => void) & ((evt: "move", id: string) => void); }>) => import("vue").VNode & { __ctx?: Awaited; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};