import React from "react"; import Select from "react-select"; import ReactTooltip from "react-tooltip"; interface IProps { progress: string; selectImageHandler: () => Promise; selectFolderHandler: () => Promise; handleModelChange: (e: any) => void; handleDrop: (e: any) => void; outputHandler: () => Promise; upscaylHandler: () => Promise; batchMode: boolean; setBatchMode: (arg: any) => void; imagePath: string; outputPath: string; doubleUpscayl: boolean; setDoubleUpscayl: (arg: boolean) => void; model: string; isVideo: boolean; setIsVideo: (arg: boolean) => void; } function LeftPaneImageSteps({ progress, selectImageHandler, selectFolderHandler, handleModelChange, handleDrop, outputHandler, upscaylHandler, batchMode, setBatchMode, imagePath, outputPath, doubleUpscayl, setDoubleUpscayl, model, isVideo, setIsVideo, }: IProps) { const handleBatchMode = () => { setBatchMode((oldValue) => !oldValue); }; const customStyles = { option: (provided, state) => ({ ...provided, borderBottom: "1px dotted pink", color: state.isSelected ? "red" : "blue", padding: 20, }), control: () => ({ // none of react-select's styles are passed to width: 200, }), singleValue: (provided, state) => { const opacity = state.isDisabled ? 0.5 : 1; const transition = "opacity 300ms"; return { ...provided, opacity, transition }; }, }; const modelOptions = [ { label: "General Photo", value: "realesrgan-x4plus" }, { label: "Digital Art", value: "realesrgan-x4plus-anime" }, { label: "Sharpen Image", value: "models-DF2K" }, ]; return (
{/* BATCH OPTION */}

Batch Upscale

{/* STEP 1 */}

Step 1

{/* STEP 2 */}

Step 2

Select Upscaling Type

{ if (e.target.checked) { setDoubleUpscayl(true); } else { setDoubleUpscayl(false); } }} />

{ setDoubleUpscayl(!doubleUpscayl); }}> Double Upscayl

)}
{/* STEP 3 */}

Step 3

Defaults to Image's path

{/* STEP 4 */}

Step 4

); } export default LeftPaneImageSteps;