import React, { CSSProperties } from 'react'; import { LayoutWorkerHook } from './useWorkerLayoutFactory'; type WorkerLayoutLabelKeys = 'start' | 'stop'; /** * Properties for `WorkerLayoutControl` component */ export interface WorkerLayoutControlProps { /** * HTML id */ id?: string; /** * HTML class */ className?: string; /** * HTML CSS style */ style?: CSSProperties; /** * The layout hook to use */ layout: LayoutWorkerHook; /** * Option to tell what we do when the component is mounted * - -1 means that we do nothing (it's the same as no value) * - 0 means that we start the algo (and don't auto stop it) * - X mans that we start the algo, and stop it after X milliseconds */ autoRunFor?: number; /** * It's possible to customize the button, by passing to JSX Element. * First one is for the "start layout", and the second to "stop layout". * Example : * ```jsx * * <> * Start * Stop * * * ``` */ children?: [React.JSX.Element, React.JSX.Element]; /** * Map of the labels we use in the component. * This is usefull for I18N */ labels?: { [Key in WorkerLayoutLabelKeys]?: string; }; } export declare function WorkerLayoutControl({ id, className, style, layout, autoRunFor, children, labels, }: WorkerLayoutControlProps): React.JSX.Element; export {};