import React from 'react'; import { ValueConstructor, UnionToIntersection } from '@karma.run/utility'; import { BlockProps, BlockConstructorFn } from './block'; import { IconElement } from '../data/icon'; export interface BlockCaseProps { label: string; icon: IconElement; defaultValue: ValueConstructor; field: BlockConstructorFn; } export interface BlockListValue { key: string; type: T; value: V; } export declare type BlockMap = Record; export declare type BlockMapForValue = UnionToIntersection ? { [K in T]: BlockCaseProps; } : never>; export interface BlockListItemProps { index: number; value: BlockListValue; icon: IconElement; autofocus: boolean; disabled?: boolean; onChange: (index: number, value: React.SetStateAction>) => void; onDelete: (index: number) => void; onMoveUp?: (index: number) => void; onMoveDown?: (index: number) => void; children: (props: BlockProps) => JSX.Element; } export declare function useBlockMap(map: () => BlockMapForValue, deps: ReadonlyArray | undefined): UnionToIntersection ? { [K in T]: BlockCaseProps; } : never>; export interface BlockListProps extends BlockProps { children: BlockMapForValue; } export declare function BlockList({ value: values, children, disabled, onChange }: BlockListProps): JSX.Element; //# sourceMappingURL=blockList.d.ts.map