'use client';
import { Button } from '@repo/shadcn/button';
import { Heading } from '@repo/shadcn/heading';
import { Plus } from 'lucide-react';
import { useState } from 'react';
import { AccountPlanModal } from './user-modal';

export function UsersHeader() {
  const [open, setOpen] = useState(false);
  // const router = useRouter();
  return (
    <>
      <div className="flex items-start justify-between">
        <Heading
          title="Administración de usuarios"
          description="Gestiona los usuarios registrados en la plataforma"
        />
        <Button onClick={() => setOpen(true)} size="sm">
          <Plus className="mr-2 h-4 w-4" /> Agregar Usuario
        </Button>
      </div>

      <AccountPlanModal open={open} onOpenChange={setOpen} />
    </>
  );
}