import React from "react";
import PropTypes from "prop-types";
import { List } from "@mui/material";
import ContactOption from "./ContactOption";

const ContactOptionList = ({ options }) => {
  return (
    <List>
      {options.map((z, index) => (
        <ContactOption
          key={`contact_${index}_${z.id}`}
          icon={z.icon}
          tooltip={z.tooltip}
          label={z.label}
          link={z.link}
          onClick={z.onClick}
          onIconClick={z.onIconClick}
          iconTooltip={z.iconTooltip}
        />
      ))}
    </List>
  );
};

ContactOptionList.propTypes = {
  options: PropTypes.array.isRequired
};

export default ContactOptionList;
