import * as React from "react"; import { BootedCrochet, CrochetValue } from "../../crochet"; import { IElement } from "./ui/basic"; import { CodeEditor } from "./ui/code-editor"; import { CrochetModule } from "../../vm"; declare type IPlayground = { crochet: BootedCrochet; module: CrochetModule; }; declare type IPlaygroundState = { editors: { id: number; editor: React.ReactNode; }[]; }; export declare class PlaygroundUI extends React.Component { private id; private next_id; constructor(props: IPlayground); render(): JSX.Element; make_editor(): { id: number; editor: JSX.Element; }; addEditor: () => void; removeEditor: (id: number) => void; } declare class PEOk { readonly value: CrochetValue; constructor(value: CrochetValue); } declare class PEFail { readonly error: any; constructor(error: any); } declare class PEMessage { readonly message: React.ReactNode; constructor(message: React.ReactNode); } declare type PEResult = PEOk | PEFail | PEMessage; declare type PEProps = IElement & { code: string; crochet: BootedCrochet; module: CrochetModule; dispose?: () => void; }; declare type PEState = { code: string; result: PEResult | null; changed: boolean; running: boolean; }; export declare class PlaygroundEditor extends React.Component { readonly editor: React.RefObject; constructor(props: PEProps); codeChanged: (code: string) => void; remove: () => void; runCode: () => Promise; render(): JSX.Element; renderResult(): JSX.Element | null; renderSpecificResult(result: PEResult): JSX.Element; } export {};