"use strict";

exports.__esModule = true;
exports.SkipAlbumButton = exports.ShuffleButton = exports.PrevButton = exports.NextButton = exports.PauseButton = exports.PlayButton = void 0;

var _react = _interopRequireDefault(require("react"));

var _ActionButton = _interopRequireDefault(require("./ActionButton"));

var _icons = require("@material-ui/icons");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const PlayButton = props => {
  let label = 'play',
      icon = /*#__PURE__*/_react.default.createElement(_icons.PlayArrow, {
    className: props.iconClassName
  }); // if (props.isPlaying) {
  //   label = "pause";
  //   icon = <Pause className={props.iconClassName}/>;
  // } else if (props.isLoading) {
  //   label = "loading";
  //   icon = <Update className={props.iconClassName}/>;
  // }
  // console.warn(props);


  const coreProps = {
    // action: props.actions ? props.actions.playOrPause : null,
    action: props.action,
    label: label,
    disabled: props.isLoading,
    fab: props.fab,
    color: props.color,
    standalone: props.standalone,
    buttonClassName: props.buttonClassName
  };
  return /*#__PURE__*/_react.default.createElement(_ActionButton.default, coreProps, icon);
};

exports.PlayButton = PlayButton;

const PauseButton = props => {
  let label = 'pause',
      icon = /*#__PURE__*/_react.default.createElement(_icons.Pause, {
    className: props.iconClassName
  }); // if (props.isPlaying) {
  //   label = "pause";
  //   icon = <Pause className={props.iconClassName}/>;
  // } else if (props.isLoading) {
  //   label = "loading";
  //   icon = <Update className={props.iconClassName}/>;
  // }
  // console.warn(props);


  const coreProps = {
    // action: props.actions ? props.actions.playOrPause : null,
    action: props.action,
    label: label,
    disabled: props.isLoading,
    fab: props.fab,
    color: props.color,
    standalone: props.standalone,
    buttonClassName: props.buttonClassName
  };
  return /*#__PURE__*/_react.default.createElement(_ActionButton.default, coreProps, icon);
};

exports.PauseButton = PauseButton;

const NextButton = props => {
  const icon = /*#__PURE__*/_react.default.createElement(_icons.SkipNext, {
    className: props.iconClassName
  });

  const coreProps = {
    action: props.action,
    label: 'next',
    // disabled: props.isLoading,
    fab: props.fab,
    buttonClassName: props.buttonClassName
  };
  return /*#__PURE__*/_react.default.createElement(_ActionButton.default, coreProps, icon);
};

exports.NextButton = NextButton;

const PrevButton = props => {
  const icon = /*#__PURE__*/_react.default.createElement(_icons.SkipPrevious, {
    className: props.iconClassName
  });

  const coreProps = {
    action: props.action,
    label: 'prev',
    // disabled: props.isLoading,
    fab: props.fab,
    buttonClassName: props.buttonClassName
  };
  return /*#__PURE__*/_react.default.createElement(_ActionButton.default, coreProps, icon);
};

exports.PrevButton = PrevButton;

const ShuffleButton = props => {
  const icon = /*#__PURE__*/_react.default.createElement(_icons.Shuffle, {
    className: props.iconClassName
  });

  const coreProps = {
    action: props.action,
    label: 'shuffle',
    // disabled: props.isLoading,
    fab: props.fab,
    buttonClassName: props.buttonClassName
  };
  return /*#__PURE__*/_react.default.createElement(_ActionButton.default, coreProps, icon);
};

exports.ShuffleButton = ShuffleButton;

const SkipAlbumButton = props => {
  const icon = /*#__PURE__*/_react.default.createElement(_icons.Redo, {
    className: props.iconClassName
  });

  const coreProps = {
    action: props.action,
    label: 'skip album',
    // disabled: props.isLoading,
    fab: props.fab,
    buttonClassName: props.buttonClassName
  };
  return /*#__PURE__*/_react.default.createElement(_ActionButton.default, coreProps, icon);
};

exports.SkipAlbumButton = SkipAlbumButton;