import type { IconData } from '@blocksuite/affine-shared/services'; import type { UniComponent } from '@blocksuite/affine-shared/types'; import { ShadowlessElement } from '@blocksuite/std'; import { type Signal } from '@preact/signals-core'; import { html, type TemplateResult } from 'lit'; import { type StyleInfo, styleMap } from 'lit/directives/style-map.js'; // Copy of renderUniLit from callout-block.ts const renderUniLit = >( uni: UniComponent | undefined, props?: Props, options?: { ref?: Signal; style?: Readonly; class?: string; } ): TemplateResult => { return html` `; }; export interface IconPickerWrapperProps { onSelect?: (iconData?: IconData) => void; onClose?: () => void; } export class IconPickerWrapper extends ShadowlessElement { iconPickerComponent?: UniComponent; props?: IconPickerWrapperProps; constructor() { super(); } override render() { if (!this.iconPickerComponent) { return html``; } return renderUniLit(this.iconPickerComponent, this.props); } } declare global { interface HTMLElementTagNameMap { 'icon-picker-wrapper': IconPickerWrapper; } }