2024-11-11 09:50:18 -08:00
|
|
|
import { ProxyLocation } from "@/api/types";
|
|
|
|
|
import {
|
|
|
|
|
Select,
|
|
|
|
|
SelectContent,
|
|
|
|
|
SelectItem,
|
|
|
|
|
SelectTrigger,
|
|
|
|
|
SelectValue,
|
|
|
|
|
} from "./ui/select";
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
value: ProxyLocation | null;
|
|
|
|
|
onChange: (value: ProxyLocation) => void;
|
2024-11-26 10:41:18 -08:00
|
|
|
className?: string;
|
2024-11-11 09:50:18 -08:00
|
|
|
};
|
|
|
|
|
|
2024-11-26 10:41:18 -08:00
|
|
|
function ProxySelector({ value, onChange, className }: Props) {
|
2024-11-11 09:50:18 -08:00
|
|
|
return (
|
|
|
|
|
<Select value={value ?? ""} onValueChange={onChange}>
|
2024-11-26 10:41:18 -08:00
|
|
|
<SelectTrigger className={className}>
|
2024-11-11 09:50:18 -08:00
|
|
|
<SelectValue placeholder="Proxy Location" />
|
|
|
|
|
</SelectTrigger>
|
|
|
|
|
<SelectContent>
|
|
|
|
|
<SelectItem value={ProxyLocation.Residential}>Residential</SelectItem>
|
2025-02-24 06:29:12 -08:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialISP}>
|
|
|
|
|
Residential ISP (US)
|
|
|
|
|
</SelectItem>
|
2025-05-02 21:34:56 -07:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialAR}>
|
|
|
|
|
Residential (Argentina)
|
2024-11-11 09:50:18 -08:00
|
|
|
</SelectItem>
|
2025-06-27 10:13:59 +09:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialAU}>
|
|
|
|
|
Residential (Australia)
|
2024-11-11 09:50:18 -08:00
|
|
|
</SelectItem>
|
2025-10-02 11:12:06 -04:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialBR}>
|
|
|
|
|
Residential (Brazil)
|
|
|
|
|
</SelectItem>
|
|
|
|
|
<SelectItem value={ProxyLocation.ResidentialCA}>
|
|
|
|
|
Residential (Canada)
|
|
|
|
|
</SelectItem>
|
2025-05-02 21:34:56 -07:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialFR}>
|
|
|
|
|
Residential (France)
|
2024-11-11 09:50:18 -08:00
|
|
|
</SelectItem>
|
2025-06-27 10:13:59 +09:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialDE}>
|
|
|
|
|
Residential (Germany)
|
2025-01-09 07:52:48 -08:00
|
|
|
</SelectItem>
|
2025-05-02 21:34:56 -07:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialIN}>
|
|
|
|
|
Residential (India)
|
2025-01-09 07:52:48 -08:00
|
|
|
</SelectItem>
|
2025-05-02 21:34:56 -07:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialIE}>
|
|
|
|
|
Residential (Ireland)
|
|
|
|
|
</SelectItem>
|
2025-10-02 11:12:06 -04:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialIT}>
|
|
|
|
|
Residential (Italy)
|
|
|
|
|
</SelectItem>
|
2025-05-02 21:34:56 -07:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialJP}>
|
|
|
|
|
Residential (Japan)
|
2025-02-01 05:29:42 +08:00
|
|
|
</SelectItem>
|
2025-10-02 11:12:06 -04:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialMX}>
|
|
|
|
|
Residential (Mexico)
|
|
|
|
|
</SelectItem>
|
|
|
|
|
<SelectItem value={ProxyLocation.ResidentialNL}>
|
|
|
|
|
Residential (Netherlands)
|
|
|
|
|
</SelectItem>
|
2025-03-01 01:18:24 -05:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialNZ}>
|
|
|
|
|
Residential (New Zealand)
|
|
|
|
|
</SelectItem>
|
2025-06-27 10:13:59 +09:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialZA}>
|
|
|
|
|
Residential (South Africa)
|
|
|
|
|
</SelectItem>
|
2025-05-02 21:34:56 -07:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialES}>
|
|
|
|
|
Residential (Spain)
|
|
|
|
|
</SelectItem>
|
2025-10-02 11:12:06 -04:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialTR}>
|
|
|
|
|
Residential (Turkey)
|
|
|
|
|
</SelectItem>
|
2025-06-27 10:13:59 +09:00
|
|
|
<SelectItem value={ProxyLocation.ResidentialGB}>
|
|
|
|
|
Residential (United Kingdom)
|
2025-03-01 01:18:24 -05:00
|
|
|
</SelectItem>
|
2024-11-11 09:50:18 -08:00
|
|
|
</SelectContent>
|
|
|
|
|
</Select>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export { ProxySelector };
|