import { TextField } from '@mui/material'
import { Search } from 'lucide-react'
import { StyledInputs } from './mui/styled-inputs'
import { Label } from './ui/label'
import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from './ui/select'

export default function SearchFilter() {
  return (
    <div className="container grid md:grid-cols-2 gap-8 items-end mb-8">
      <div className="flex items-center max-w-[712px] flex-1">
        <TextField
          label="O que você quer aprender hoje?"
          variant="standard"
          type="text"
          className="w-full"
          sx={StyledInputs({ color: '#fafafa' })}
        />
        <Search size={24} className="-ml-6" />
      </div>
      <div>
        <Label>Filtrados por</Label>
        <Select defaultValue="recent">
          <SelectTrigger className="flex items-center max-w-[712px] flex-1">
            <SelectValue />
          </SelectTrigger>
          <SelectContent>
            <SelectGroup>
              <SelectItem value="recent">Mais recentes</SelectItem>
              <SelectItem value="fast">Cursos rápidos</SelectItem>
              <SelectItem value="students">Estudantes</SelectItem>
              <SelectItem value="immediate">Início imediato</SelectItem>
            </SelectGroup>
          </SelectContent>
        </Select>
      </div>
    </div>
  )
}
