import React from 'react';
import { FaPlus, FaSearch } from 'react-icons/fa';

function ModelTopBar({ onOpenAdd, onSearch }) {
    return (
        <div className='flex items-center space-x-3'>
            {/* Search Bar */}
            <div className="input-group">
                <input
                    type="text"
                    placeholder="Search models..."
                    className="input input-bordered input-sm w-32 md:w-auto"
                    onChange={(e) => onSearch(e.target.value)}
                />
                <button className="btn btn-square btn-sm"><FaSearch /></button>
            </div>

            {/* Add Button */}
            <button className="btn btn-primary btn-sm" onClick={onOpenAdd}>
                <FaPlus className="w-4 h-4" /> Register New Model
            </button>
        </div>
    );
}

export default ModelTopBar;