import { z } from "zod"; import { COMP_NAME, CompositionProps } from "../../types/constants"; import { useRendering } from "../helpers/use-rendering"; import { AlignEnd } from "./AlignEnd"; import { Button } from "./Button"; import { InputContainer } from "./Container"; import { DownloadButton } from "./DownloadButton"; import { ErrorComp } from "./Error"; import { Input } from "./Input"; import { ProgressBar } from "./ProgressBar"; import { Spacing } from "./Spacing"; export const RenderControls: React.FC<{ text: string; setText: React.Dispatch>; inputProps: z.infer; }> = ({ text, setText, inputProps }) => { const { renderMedia, state, undo } = useRendering(COMP_NAME, inputProps); return ( {state.status === "init" || state.status === "invoking" || state.status === "error" ? ( <> {state.status === "error" ? ( ) : null} ) : null} {state.status === "rendering" || state.status === "done" ? ( <> ) : null} ); };