import React, { useState } from 'react';
import { View } from 'react-native';
import { List } from 'react-native-paper';

const NetworkDropdown = () => {
  const [expanded, setExpanded] = useState<boolean>(false);

  const expandNetworks = () => setExpanded(!expanded);

  return (
    <View style={{ marginBottom: 20 }}>
      <List.Accordion
        title="Select Network"
        expanded={expanded}
        onPress={expandNetworks}>
        <List.Item
          title="Ethereum"
          onPress={() => {
            setExpanded(false);
          }}
        />
        <List.Item
          title="Cosmos"
          onPress={() => {
            setExpanded(false);
          }}
        />
      </List.Accordion>
    </View>
  );
};

export { NetworkDropdown };
