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

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

    return (
        <TextInput
            {...restProps}
            label={"Api-Key"}
            placeholder={"Введите Api-Key"}
            value={props.value?.["Api-Key"] || ""}
            onChange={value => {
                props.onChange({
                    ...props.value,
                    "Api-Key": value.target.value,
                });
            }}
        />
    );
};

export default YandexMarketInputs;
