import { ViewContainerRef, Type } from '@angular/core';
import { NgDocTocItem } from '@ng-doc/app/interfaces';
import { NgDocPlaygroundProperty } from '@ng-doc/core/interfaces';

/**
 *
 * @param value
 */
declare function asBoolean(value: unknown): boolean;

/**
 *
 * @param viewContainer
 * @param component
 * @param inputs
 */
declare function createComponent<T>(viewContainer: ViewContainerRef, component: Type<T>, inputs?: object): void;

/**
 *
 * @param html
 */
declare function formatHtml(html: string): Promise<string>;

/**
 * Generate table of contents, only for headings with id
 * @param container
 * @param headings
 */
declare function generateToc(container: HTMLElement): NgDocTocItem[];

/**
 * Check if the OS theme is dark
 */
declare function isDarkOsTheme(): boolean;

/**
 *
 * @param url
 */
declare function isExternalLink(url: string): boolean;

/**
 *
 * @param obj
 */
declare function isPlaygroundProperty(obj: Record<string, any>): obj is NgDocPlaygroundProperty;

export { asBoolean, createComponent, formatHtml, generateToc, isDarkOsTheme, isExternalLink, isPlaygroundProperty };
