import { View } from "react-native";
import { IconButton } from "react-native-paper";

import { Todo } from "@/store/models/Todo.model";

interface AdminTodoActionsProps {
  todo: Todo;
  onView: (todo: Todo) => void;
  onEdit: (todo: Todo) => void;
  onDelete: (todo: Todo) => void;
}

export const AdminTodoActions = ({
  todo,
  onView,
  onEdit,
  onDelete,
}: AdminTodoActionsProps) => {
  return (
    <View className="flex-row justify-center">
      <IconButton icon="eye-outline" onPress={() => onView(todo)} size={20} />
      <IconButton
        icon="pencil-outline"
        onPress={() => onEdit(todo)}
        size={20}
      />
      <IconButton
        icon="delete-outline"
        onPress={() => onDelete(todo)}
        size={20}
      />
    </View>
  );
};
