import React from "react";
import { EyeDroperIcon } from "../../icons/ExportCommonIcons";

interface EyeDropInputProps {
  label: string;
  value: string;
  onChange: (value: string) => void;
}

const EyeDropInput: React.FC<EyeDropInputProps> = ({
  label = "Object",
  value,
  onChange,
}) => {
  const handleEyeDropClick = () => {
    const simulatedValue = "picked_value"; // Replace with actual eye dropper logic
    onChange(simulatedValue);
  };

  return (
    <div className="eye-dropper-input-container">
      <div className="label">{label}</div>
      <div className="input-container">
        <input disabled type="text" value={value}/>
        {/* <input type="text" value={activeValue ?? "null"} disabled /> */}
        {/* <input type="button" value="Clear" onClick={handleEyeDropClick}/> */}
        <button id="eye-picker" className="eye-picker-button" onClick={handleEyeDropClick}>
          <EyeDroperIcon isActive={false} />
        </button>
      </div>
    </div>
  );
};

export default EyeDropInput;
