import { JSXElement } from 'solid-js';
import { Tag } from '@malloydata/malloy-tag';
import { Field, NestField, NestCell, FieldType, Cell } from '../data_tree';
import { RenderMetadata, GetResultMetadataOptions } from '../component/render-result-metadata';
import { JSONSchemaObject } from './json-schema-types';
export interface RenderProps {
    dataColumn: Cell;
    field: Field;
    customProps?: Record<string, unknown>;
}
interface BaseRenderPluginInstance<TMetadata = unknown> {
    readonly name: string;
    readonly field: Field;
    readonly sizingStrategy: 'fixed' | 'fill';
    getMetadata(): TMetadata;
    processData?(field: NestField, cell: NestCell): void;
    beforeRender?(metadata: RenderMetadata, options: GetResultMetadataOptions): void;
    getStyleOverrides?(): Record<string, string>;
}
export interface SolidJSRenderPluginInstance<TMetadata = unknown> extends BaseRenderPluginInstance<TMetadata> {
    readonly renderMode: 'solidjs';
    renderComponent(props: RenderProps): JSXElement;
}
export interface DOMRenderPluginInstance<TMetadata = unknown> extends BaseRenderPluginInstance<TMetadata> {
    readonly renderMode: 'dom';
    renderToDOM(container: HTMLElement, props: RenderProps): void;
    cleanup?(container: HTMLElement): void;
}
export type RenderPluginInstance<TMetadata = unknown> = SolidJSRenderPluginInstance<TMetadata> | DOMRenderPluginInstance<TMetadata>;
export interface CoreVizPluginMethods {
    getSchema(): JSONSchemaObject;
    getSettings(): Record<string, unknown>;
    getDefaultSettings(): Record<string, unknown>;
    settingsToTag(settings: Record<string, unknown>): Tag;
}
export type CoreVizPluginInstance<TMetadata = unknown> = SolidJSRenderPluginInstance<TMetadata> & CoreVizPluginMethods;
export interface RenderPluginFactory<TInstance extends RenderPluginInstance = RenderPluginInstance> {
    readonly name: string;
    matches(field: Field, fieldTag: Tag, fieldType: FieldType): boolean;
    create(field: Field, pluginOptions?: unknown, modelTag?: Tag): TInstance;
}
export declare function isCoreVizPluginInstance(plugin: RenderPluginInstance): plugin is CoreVizPluginInstance;
export {};
