import PropTypes from 'prop-types';
import React from 'react';
import { align } from 'Helpers/Props';
import ViewMenu from 'Components/Menu/ViewMenu';
import MenuContent from 'Components/Menu/MenuContent';
import ViewMenuItem from 'Components/Menu/ViewMenuItem';

function ArtistIndexViewMenu(props) {
  const {
    view,
    onViewSelect
  } = props;

  return (
    <ViewMenu alignMenu={align.RIGHT}>
      <MenuContent>
        <ViewMenuItem
          name="table"
          selectedView={view}
          onPress={onViewSelect}
        >
          Table
        </ViewMenuItem>

        <ViewMenuItem
          name="posters"
          selectedView={view}
          onPress={onViewSelect}
        >
          Posters
        </ViewMenuItem>

        <ViewMenuItem
          name="banners"
          selectedView={view}
          onPress={onViewSelect}
        >
          Banners
        </ViewMenuItem>
      </MenuContent>
    </ViewMenu>
  );
}

ArtistIndexViewMenu.propTypes = {
  view: PropTypes.string.isRequired,
  onViewSelect: PropTypes.func.isRequired
};

export default ArtistIndexViewMenu;
