"use client"; import React, { useState, useEffect } from "react"; import { Input } from "./ui/input"; import { Label } from "./ui/label"; import { Button } from "./ui/button"; import { CiSearch } from "react-icons/ci"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { IoMdClose } from "react-icons/io"; import { useMediaQuery } from "react-responsive"; export default function Search({ mode, value, action, changeValue, }: { mode: string; value: any; action: (any: any) => any; changeValue: (any: any) => any; }) { // useEffect(() => { // const isMobile = useMediaQuery({ query: "(max-width: 768px)" }); // }, []); return (
{mode === "controller" || mode === "admin" ? (
changeValue(e.target.value)} placeholder="جستجو..." required /> {/* */}
) : ( <>

فرم جستجو

)}
); }