"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _classnames = _interopRequireDefault(require("classnames"));
var _verticalTabs = _interopRequireDefault(require("../../molecule/vertical-tabs"));
var _inputText = _interopRequireDefault(require("../../atom/input-text"));
var _inputTextarea = _interopRequireDefault(require("../../atom/input-textarea"));
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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); }
const buildCtaButton = cta => {
  if (!cta) {
    return;
  }
  return /*#__PURE__*/_react.default.createElement("div", {
    className: (0, _classnames.default)(_style.default.button, _style.default.binButton)
  }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
    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.default.createElement("div", {
    className: _style.default.container
  }, /*#__PURE__*/_react.default.createElement(_verticalTabs.default, _extends({}, ariaLabel, {
    className: _style.default.menu,
    tabs: languageTabs
  })), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.horizontalSection
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.input
  }, /*#__PURE__*/_react.default.createElement(_inputText.default, inputText)), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.input
  }, /*#__PURE__*/_react.default.createElement(_inputTextarea.default, textArea)), ctaButton));
};
PlayListTranslation.propTypes = process.env.NODE_ENV !== "production" ? {
  languageTabs: _verticalTabs.default.propTypes.tabs,
  inputText: _propTypes.default.shape({
    ..._inputText.default.propTypes,
    theme: _propTypes.default.string
  }),
  textArea: _propTypes.default.shape({
    ..._inputTextarea.default.propTypes,
    theme: _propTypes.default.string
  }),
  cta: _propTypes.default.shape({
    label: _propTypes.default.string,
    handleOnClick: _propTypes.default.func,
    type: _propTypes.default.oneOf(['delete'])
  }),
  'list-aria-label': _propTypes.default.string
} : {};
var _default = exports.default = PlayListTranslation;
//# sourceMappingURL=index.js.map