import { FC } from "react";
import { omit } from "lodash";
import { TextInput } from "@mantine/core";
import MpAuthDataInputProps from "../types/MpAuthDataInputProps";

const WildberriesInputs: FC<MpAuthDataInputProps> = props => {
    const restProps = omit(props, ["baseMarketplace"]);

    return (
        <TextInput
            {...restProps}
            label={"Ключ авторизации"}
            placeholder={"Введите ключ авторизации"}
            value={props.value?.Authorization || ""}
            onChange={value =>
                props.onChange({
                    ...props.value,
                    Authorization: value.target.value,
                })
            }
        />
    );
};

export default WildberriesInputs;
