import React from "react";
import PreviewSelectionWithUpload from "../../../../../ui/inputs/PreviewSelectionWithUpload";
import InputWithDropDown from "../../../../../ui/inputs/InputWithDropDown";
import LabledDropdown from "../../../../../ui/inputs/LabledDropdown";

interface SpawnActionProps {
    onChangeInterval: (value: string) => void;
    onChangeCount: (value: string) => void;
    defaultOption: string;
    options: string[];
    onSelect: (option: string) => void;
    intervalValue: string;
    countValue: string;
    intervalMin: number;
    intervalMax: number;
    intervalDefaultValue: string;
    countMin: number;
    countMax: number;
    countDefaultValue: string;
}

const SpawnAction: React.FC<SpawnActionProps> = ({
    onChangeInterval,
    onChangeCount,
    defaultOption,
    options,
    onSelect,
    intervalValue,
    countValue,
    intervalMin,
    intervalMax,
    intervalDefaultValue,
    countMin,
    countMax,
    countDefaultValue,
}) => {
    return (
        <>
            <InputWithDropDown
                label="Spawn interval"
                value={intervalValue}
                min={intervalMin}
                step={1}
                defaultValue={intervalDefaultValue}
                max={intervalMax}
                activeOption="s"
                onClick={() => { }}
                onChange={onChangeInterval}
            />
            <InputWithDropDown
                label="Spawn count"
                value={countValue}
                min={countMin}
                step={1}
                defaultValue={countDefaultValue}
                max={countMax}
                activeOption="s"
                onClick={() => { }}
                onChange={onChangeCount}
            />
            {/* <PreviewSelectionWithUpload /> */}
            <LabledDropdown
                label="Presets"
                defaultOption={defaultOption}
                options={options}
                onSelect={onSelect}
            />
        </>
    );
};

export default SpawnAction;
