import React from 'react';
import { ColorSelector } from './ItemPropertyColorSelector';

interface IItemPropertySimpleHandlerProps {
  isOpen: boolean;
  selectedColor: string;
  onClose: () => void;
  onConfirm: (color: string) => void;
  onChange: (color: string) => void;
  costWarning?: {
    cost: number;
    currency?: string;
  };
}

export const ItemPropertySimpleHandler: React.FC<IItemPropertySimpleHandlerProps> = ({
  isOpen,
  selectedColor,
  onClose,
  onConfirm,
  onChange,
  costWarning,
}) => (
  <ColorSelector
    selectedColor={selectedColor}
    isOpen={isOpen}
    onClose={onClose}
    onConfirm={onConfirm}
    onChange={onChange}
    costWarning={costWarning}
  />
);
