import { Label } from "@/components/mutual/shadcnui/label";
import { Textarea } from "@/components/mutual/shadcnui/textarea";
import { SearchProps } from "@/validations/mutual/table/type";

const SearchBarComponent: React.FC<SearchProps> = ({ pagination, setPagination }) => {
    const handleSearch = (query: string) => {
        setTimeout(() => {
            setPagination({ ...pagination, query: {} })
        }, 2000)
    }
    return (
        <div>
            <div className="grid grid-cols-1 w-full px-10 py-2">
                <Label>Search</Label>
                <Textarea
                    value={JSON.stringify(pagination.query, null, 2)}
                    onChange={(e) => handleSearch(e.target.value)}
                />
            </div>
        </div>
    )
}

export default SearchBarComponent