import { useState } from 'react';
import TaskCreationModal from '../TaskCreationModal';
import { Button } from '@/components/ui/button';
import { Plus } from 'lucide-react';

export default function TaskCreationModalExample() {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <div className="p-4">
      <Button 
        onClick={() => setIsOpen(true)}
        className="w-full flex items-center gap-2"
      >
        <Plus className="w-4 h-4" />
        Create New Task
      </Button>
      
      <TaskCreationModal
        isOpen={isOpen}
        onClose={() => setIsOpen(false)}
        onSave={(task) => {
          console.log('Task saved:', task);
          setIsOpen(false);
        }}
      />
    </div>
  );
}