import Search from "@/components/icons/Search";
import { Button, ButtonGroup, TextField } from "@mui/material";
import ModalSearchCity from "./modal";
import SearchD from "@/components/icons/SearchD";

function SearchBar() {
    return (
        <ButtonGroup
            variant="contained"
            className="
            !py-[4px] sm:!py-[7px] md:!py-[10px] lg:!py-[12px] !gap-3
            !px-[4px] sm:!px-[8px] md:!px-[12px] lg:!px-[16px]   
            !bg-[#FAFAFA] !shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)] w-full lg:w-fit
            "
        >
            <ModalSearchCity />
            <span className="black w-px bg-[#EFEFEF]"></span>
            <TextField
                variant="standard"
                InputProps={{
                    disableUnderline: true
                }}
                sx={{
                    display: 'flex',
                    flexDirection: 'column',
                    justifyContent: 'center',
                    '& .MuiInput-root': {
                        padding: '0',
                        borderBottom: 'none',
                    },
                    '& .MuiInputBase-input': {
                        color: '#6C757D'
                    }
                }}
                placeholder="جستجوی نام پزشک، تخصص، بیماری ..."
                dir='rtl'
                className={`!shadow-none !w-full lg:!w-[524px] bg-[#FAFAFA] !text-[14px] md:!text-[16px] !rounded-0 !font-normal !text-[#6C757D]`}
            />
            <Button className="!hidden lg:!flex !rounded-[4px] !h-[40px] sm:!h-[42px] md:!h-[45px] lg:!h-[48px] !gap-2.5 !min-w-[114px]">
                <div className="min-w-[20px] min-h-[20px]">
                    <Search />
                </div>
                <p>جستجو</p>
            </Button>
            <Button
                className="!flex lg:!hidden !rounded-[4px] !w-[40px] sm:!w-[42px] md:!w-[45px] lg:!w-[48px]
                !h-[40px] sm:!h-[42px] md:!h-[45px] lg:!h-[48px] !gap-2.5 !p-2.5"
            >
                <SearchD />
            </Button>
        </ButtonGroup>
    )
}

export default SearchBar