import React from 'react';
import IconPreview from '../../molecule/icon-preview';
import InputText from '../../atom/input-text';
import ButtonLink from '../../atom/button-link';
import Provider, { GetTranslateFromContext } from '../../atom/provider';
import { COLORS } from '../../variables/colors';
import style from './style.css';
import propTypes from './types';
const IconEditor = (props, legacyContext) => {
  const translate = GetTranslateFromContext(legacyContext);
  const {
    iconPreview,
    inputText,
    buttonLink
  } = props;
  const {
    title,
    icon
  } = iconPreview;
  const inputTextProps = {
    ...inputText,
    type: 'text',
    title: translate('icon_editor_color'),
    placeholder: COLORS.white,
    theme: 'coorpmanager',
    disabled: false,
    valid: false,
    inputColor: true
  };
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPreview, {
    icon: {
      ...icon
    },
    title: title
  }), /*#__PURE__*/React.createElement("div", {
    className: style.inputButtonContainer
  }, /*#__PURE__*/React.createElement(InputText, inputTextProps), buttonLink ? /*#__PURE__*/React.createElement(ButtonLink, buttonLink) : null));
};
IconEditor.contextTypes = {
  translate: Provider.childContextTypes.translate
};
IconEditor.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
export default IconEditor;
//# sourceMappingURL=index.js.map