import { OptionPanelProps } from '@components/DesignPanel/types';
import ButtonToggleGroup from '@components/ui/ButtonToggle';

export const ImageFit: React.FC<OptionPanelProps> = ({
  options,
  activeOptionValue,
  emitOptions,
}) => {
  return (
    <div key={`ImageFit`}>
      <ButtonToggleGroup
        size="small"
        display="icon"
        defaultPressed={activeOptionValue}
        onPressedChange={(value) => {
          emitOptions([{ id: 'mediafit', value: value }]);
        }}
        options={options}
      />
    </div>
  );
};

export default ImageFit;
