import React from "react";
import InputWithDropDown from "../../../../../ui/inputs/InputWithDropDown";
import SwapAction from "./SwapAction";

interface ProcessActionProps {
    value: string;
    min: number;
    max: number;
    defaultValue: string;
    onChange: (value: string) => void;
    swapOptions: string[];
    swapDefaultOption: string;
    onSwapSelect: (value: string) => void;
}

const ProcessAction: React.FC<ProcessActionProps> = ({
    value,
    min,
    max,
    defaultValue,
    onChange,
    swapOptions,
    swapDefaultOption,
    onSwapSelect,
}) => {
    return (
        <>
            <InputWithDropDown
                label="Process Time"
                value={value}
                min={min}
                step={1}
                max={max}
                defaultValue={defaultValue}
                activeOption="s"
                onClick={() => { }}
                onChange={onChange}
            />
            <SwapAction
                options={swapOptions}
                defaultOption={swapDefaultOption}
                onSelect={onSwapSelect}
            />
        </>
    );
};

export default ProcessAction;
