import { View } from "react-native";

import { Button } from "@/components/ui/Button";

interface SelectionControlsProps {
  selectAll: boolean;
  selectedUsers: string[];
  onSelectAll: () => void;
  onBulkDelete: () => void;
}

export const SelectionControls = ({
  selectAll,
  selectedUsers,
  onSelectAll,
  onBulkDelete,
}: SelectionControlsProps) => {
  return (
    <View className="flex-row">
      {selectedUsers?.length > 0 && (
        <Button
          onPress={onBulkDelete}
          icon="delete-outline"
          className="mr-1"
          buttonTextColor="white"
          disabled={false}
        >
          Delete ({selectedUsers?.length})
        </Button>
      )}
      <Button
        onPress={onSelectAll}
        buttonColor="#6750a4"
        buttonTextColor="white"
        disabled={false}
        icon="account-multiple-outline"
      >
        {selectAll ? "Deselect All" : "Select All"}
      </Button>
    </View>
  );
};
