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

export function UsersHeader() {
  const [open, setOpen] = useState(false);
  // const router = useRouter();
  return (
    <>
      <div className="flex items-start justify-between">
        <Heading
          title="Mi inventario"
          description="Gestione aquí los productos que registre en la plataforma"
        />
        <Button onClick={() => setOpen(true)} size="sm">
          <Plus className="h-4 w-4" /><span className='hidden md:inline'>Agregar Producto</span>
        </Button>
      </div>

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