function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import VerticalLanguageMenu from '../../molecule/vertical-tabs';
import InputText from '../../atom/input-text';
import TextArea from '../../atom/input-textarea';
import Button from '../../atom/button-link';
import style from './style.css';
const buildCtaButton = cta => {
  if (!cta) {
    return;
  }
  return /*#__PURE__*/React.createElement("div", {
    className: classNames(style.button, style.binButton)
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: cta.handleOnClick,
    type: "text",
    icon: {
      type: 'bin',
      position: 'left'
    },
    label: cta.label
  }));
};
const PlayListTranslation = props => {
  const {
    languageTabs,
    inputText,
    textArea,
    cta,
    'list-aria-label': listAriaLabel
  } = props;
  const ctaButton = buildCtaButton(cta);
  const ariaLabel = {
    'aria-label': listAriaLabel
  };
  return /*#__PURE__*/React.createElement("div", {
    className: style.container
  }, /*#__PURE__*/React.createElement(VerticalLanguageMenu, _extends({}, ariaLabel, {
    className: style.menu,
    tabs: languageTabs
  })), /*#__PURE__*/React.createElement("div", {
    className: style.horizontalSection
  }, /*#__PURE__*/React.createElement("div", {
    className: style.input
  }, /*#__PURE__*/React.createElement(InputText, inputText)), /*#__PURE__*/React.createElement("div", {
    className: style.input
  }, /*#__PURE__*/React.createElement(TextArea, textArea)), ctaButton));
};
PlayListTranslation.propTypes = process.env.NODE_ENV !== "production" ? {
  languageTabs: VerticalLanguageMenu.propTypes.tabs,
  inputText: PropTypes.shape({
    ...InputText.propTypes,
    theme: PropTypes.string
  }),
  textArea: PropTypes.shape({
    ...TextArea.propTypes,
    theme: PropTypes.string
  }),
  cta: PropTypes.shape({
    label: PropTypes.string,
    handleOnClick: PropTypes.func,
    type: PropTypes.oneOf(['delete'])
  }),
  'list-aria-label': PropTypes.string
} : {};
export default PlayListTranslation;
//# sourceMappingURL=index.js.map