import { message } from 'antd';

export const useTeamActions = () => {
  const handleUpdate = (id, values) => {
    // 模拟API调用
    console.log('Update team:', id, values);
    message.success('团队信息已更新');
  };

  const handleDelete = (id) => {
    // 模拟API调用
    console.log('Delete team:', id);
    message.success('团队已删除');
  };

  const handleAdd = (values) => {
    // 模拟API调用
    console.log('Add team:', values);
    message.success('团队已创建');
    return {
      id: Date.now().toString(),
      ...values,
    };
  };

  return {
    handleUpdate,
    handleDelete,
    handleAdd,
  };
};